Method for producing liquefied natural gas and liquid carbon dioxide (CO 2) from a feed gas of a hydrocarbon-enriched natural gas containing carbon dioxide, comprising at least 10 molar ppm of hydrocarbons having at least six carbon atoms, comprising at least the following steps: - Step a): Separation of a feed gas of natural gas, containing hydrocarbons and carbon dioxide in a processing unit, into a CO 2 -enriched gas stream and a natural gas stream; - Step b): Cooling of said natural gas at a temperature of between -20°C to-60°C by heat exchange with at least one refrigerant in a heat exchanger; - Step c) Purification of the partially-liquefied gas of step a) into compounds containing at least six carbon atoms inside a washing column containing a top of the column at the upper end thereof and a sump of the column at the lower end thereof to form, at the top of the washing column a gas stream containing less than 5ppm by volume of compounds containing at least six carbon atoms and, in the sump of the washing column, a liquid stream enriched in compounds containing at least five carbon atoms; - Step d): Condensation, at least partially, of said gas stream obtained from step c) in a heat exchanger (10, 2') to form a two-phase flow; - Step e): Separation of said two-phase flow obtained from step d) in a liquid-vapour separator at a temperature of between -60°C and -80°C to create a gas stream at the top of a separator and a liquid stream in the sump of the separator; - Step f): Use of a first portion of the liquid stream obtained from step e) as reflux at the top of the washing column; - Step g): Condensation of the gas stream obtained from step e) by heat exchange in a heat exchanger (20, 2') at a temperature of less than -100°C to form a liquefied gas containing less than 5ppm by volume of compounds containing at least six carbon atoms, characterised in that the method comprises the following step: - Step h): Liquefaction of the CO 2 -enriched gas stream obtained from step a) by heat exchange with a second portion (18") of the liquid stream obtained from step e). - Step a): Separation of a feed gas of natural gas, containing hydrocarbons and carbon dioxide in a processing unit, into a CO 2 -enriched gas stream and a natural gas stream; - Step b): Cooling of said natural gas at a temperature of between -20°C to-60°C by heat exchange with at least one refrigerant in a heat exchanger; - Step c) Purification of the partially-liquefied gas of step a) into compounds containing at least six carbon atoms inside a washing column containing a top of the column at the upper end thereof and a sump of the column at the lower end thereof to form, at the top of the washing column a gas stream containing less than 5ppm by volume of compounds containing at least six carbon atoms and, in the sump of the washing column, a liquid stream enriched in compounds containing at least five carbon atoms; - Step d): Condensation, at least partially, of said gas stream obtained from step c) in a heat exchanger (10, 2') to form a two-phase flow; - Step e): Separation of said two-phase flow obtained from step d) in a liquid-vapour separator at a temperature of between -60°C and -80°C to create a gas stream at the top of a separator and a liquid stream in the sump of the separator; - Step f): Use of a first portion of the liquid stream obtained from step e) as reflux at the top of the washing column; - Step g): Condensation of the gas stream obtained from step e) by heat exchange in a heat exchanger (20, 2') at a temperature of less than -100°C to form a liquefied gas containing less than 5ppm by volume of compounds containing at least six carbon atoms, characterised in that the method comprises the following step: - Step h): Liquefaction of the CO 2 -enriched gas stream obtained from step a) by heat exchange with a second portion (18") of the liquid stream obtained from step e). - Step h): Liquefaction of the CO 2 -enriched gas stream obtained from step a) by heat exchange with a second portion (18") of the liquid stream obtained from step e).