The invention relates to the extraction of organic compounds from mixtures of said compounds with water, using a nanoporous carbon membrane. The invention can be used in any field where it is desired to separate an organic compound of interest from water, such as the drying of alcohols or alkanes.