A description is given of a method for effectively treating in situ an infestation of insects (in the different stages of growth such as eggs, larvae or adults) and/or microorganisms in food products such as foodstuffs, grains, cereals or the like, such as for example rice, pet food and the like, stored in containers in the form of big-bags and/or containers, present in warehouses for distribution and/or processing, which method comprises the step of feeding, inside a chamber with a determined free volume and containing said infested food product, a flow of CO 2 , preferably under pressure, having a temperature of at least 15°C, said flow being fed so as to have an initial concentration of carbon dioxide in said chamber of at least 40% by volume, preferably 60% by volume, feeding until arriving at a concentration of 100% of CO 2 in said chamber such as to have an environment free of oxygen.