The invention relates to a method for producing hydrocarbides, characterised in that it comprises at least the following steps: a) anaerobic fermentation of a fermentable raw material in order to produce volatile fatty acids, b) elongation of the volatile fatty acids produced in step a) by fermentation with at least one bacterium of the Megasphaera genus, extraction of the fatty acids produced from the fermentation must, and c) production of hydrocarbides by subjecting the fatty acids produced in step b) to a Kolbe electrolysis.L'objet de l'invention est un procédé de production d'hydrocarbures, caractérisé en ce qu'il comprend au moins la mise des étapes suivantes : ‐ a) fermentation anaérobie d'une matière première fermentescible pour obtenir des acides gras volatils, ‐ b) élongation des acides gras volatils obtenus à l'étape a) par fermentation avec une 5 ou plusieurs bactérie(s) du genre Megasphaera, extraction des acides gras obtenus du moût de fermentation, ‐ c) obtention d'hydrocarbures en soumettant les acides gras obtenus à l'étape b) à une électrolyse de Kolbe.