The invention refers to a biopesticide with content of encapsulated essential oils and potassium salts of fatty acids and a method to obtain said biopesticide.In the first stage the vegetable oil is treated at ambient temperature with a solution of potassium hydroxide in the presence of a couple of surfactants and a solvent, resulting in potassium salts of fatty acids with concentration 30-40%. In the second stage, the hydrogenated vegetable oil or wax, the essential oil, a couple of surfactants and water are heated under stirring, the mixture is cooled in a controlled manner resulting in a suspension of solid lipid nanoparticles, with the nanoparticles having a shell consisting of hydrogenated vegetable oil or wax and a liquid core consisting of essential oils. The suspension is completed with potassium salts of fatty acids.