The liquid hydrocarbon stream including COS is introduced via line 1 into membrane contactor CM to be placed in contact, through membrane M, with the aqueous alkanolamine solution arriving via line 3. The COS contained in the hydrocarbon stream is absorbed by the aqueous alkanolamine solution. The liquid hydrocarbons from which the COS has been removed are evacuated from CM via line 2. The aqueous solution containing COS is sent via line 4 to zone R to be regenerated. The compounds released during regeneration, particularly COS and COS-derived products, are evacuated from zone R via line 5. The regenerated aqueous alkanolamine solution is recycled via line 3 into membrane contactor CM.