Method for biogas production in methane fermentation process, wherein biomass or waste of vegetable, animal, agricultural or industrial origin is used as the substrate, with the use of bacterial inoculum coming from the primary culture conducted on cattle slurry and the fermentation process is performed including the phases of hydrolysis, acidogenesis, acetaneogenesis and methanogenesis, characterized in that it is carried out in three stages, where every single stage runs in a separate chamber, and these chambers are connected to each other and form a linear system and furthermore: - in the first stage, the substrate is mixed, homogenised and therefrom the batch is formed with dry matter content from 10 to 25%, to which subsequently an inoculum of hydrolysis, acidogenesis and acetaneogenesis bacteria is introduced, wherein the bacterial inoculum is derived from the obtained digestate and before inoculation is subjected to aerobic treatment, Z the C:N ratio of the batch formed from substrates is from 14:1 to 40:1, and the duration of the first stage is 90 to 180 minutes and the process is performed in the inoculum and mixing chamber; - in the second stage, the batch obtained in the first stage is fed with a pump with volumetric flow rate not less than 1,5 m 3 /min to the acid-hydrogen fermentation chamber and the process is carried out at pH value 2.5 to 4.5 and overpressure between 100 and 200 mbar for 6 to 24 hours; - in the third stage, the batch obtained in the second stage, in the form of pulp, is fed cyclically with a pump with volumetric flow rate not less than 1,5 m 3 /min to the methane fermentation chamber, having a longitudinal shape through which the pulp is moved only in one direction from the beginning of the chamber to its end, the process is carried out in pH range between 7.2 to 7.5 at the start of the chamber to pH 7.8 to 8.2 at the end of the chamber and overpressure between 100 and 200 mbar, time of pulp portions flow through the methane fermentation chamber is 20 to 25 days and after that from the methane fermentation chamber the biogas containing methane is collected. - in the first stage, the substrate is mixed, homogenised and therefrom the batch is formed with dry matter content from 10 to 25%, to which subsequently an inoculum of hydrolysis, acidogenesis and acetaneogenesis bacteria is introduced, wherein the bacterial inoculum is derived from the obtained digestate and before inoculation is subjected to aerobic treatment, Z the C:N ratio of the batch formed from substrates is from 14:1 to 40:1, and the duration of the first stage is 90 to 180 minutes and the process is performed in the inoculum and mixing chamber; - in the second stage, the batch obtained in the first stage is fed with a pump with volumetric flow rate not less than 1,5 m 3 /min to the acid-hydrogen fermentation chamber and the process is carried out at pH value 2.5 to 4.5 and overpressure between 100 and 200 mbar for 6 to 24 hours; - in the third stage, the batch obtained in the second stage, in the form of pulp, is fed cyclically with a pump with volumetric flow rate not less than 1,5 m 3 /min to the methane fermentation chamber, having a longitudinal shape through which the pulp is moved only in one direction from the beginning of the chamber to its end, the process is carried out in pH range between 7.2 to 7.5 at the start of the chamber to pH 7.8 to 8.2 at the end of the chamber and overpressure between 100 and 200 mbar, time of pulp portions flow through the methane fermentation chamber is 20 to 25 days and after that from the methane fermentation chamber the biogas containing methane is collected.