A method for producing biogas from lignocellulose-containing biomass, preferably from straw, which comprises the following steps: a) mixing the lignocellulose-containing biomass with an average particle size smaller than 200 mm, preferably smaller than 20 mm, with aqueous solutions at a temperature of 60-100°C, especially 70-85°C, for a duration of 5-30 mins, especially with process water and/or with the aid of steam; a1) anaerobically fermenting the mixed, lignocellulose-containing biomass by means of microorganisms, and recovering the biogas formed; a2) performing a heat exchange operating on the countercurrent principle between the lignocellulose-containing biomass subjected to a first anaerobic fermentation obtained in step a1) and the heat-treated lignocellulose-containing biomass obtained in step b); b) further heating the lignocellulose-containing biomass heated in countercurrent from a2) to 130-200°C, preferably 150-180°C, and leaving the thus heated lignocellulose-containing biomass for a duration of 5-120 mins, preferably 10-30 mins, advantageously in a continuous flow reactor space for thermal digestion; c) anaerobically fermenting the heat-treated lignocellulose-containing biomass by means of microorganisms, and recovering the biogas formed; d) wherein the outflow after the fermentation c) is subjected at least in part to a phase separation; and e) a liquid phase in the form of process water is obtained from d), and this is recycled to the mixing of lignocellulose-containing biomass, in such a manner that the supply of fresh water in the biogas generation process and/or for mixing is at least considerably reduced or becomes completely unnecessary; and f) a solids-rich phase is formed from d), for example as organic fertilizer. a) mixing the lignocellulose-containing biomass with an average particle size smaller than 200 mm, preferably smaller than 20 mm, with aqueous solutions at a temperature of 60-100°C, especially 70-85°C, for a duration of 5-30 mins, especially with process water and/or with the aid of steam; a1) anaerobically fermenting the mixed, lignocellulose-containing biomass by means of microorganisms, and recovering the biogas formed; a2) performing a heat exchange operating on the countercurrent principle between the lignocellulose-containing biomass subjected to a first anaerobic fermentation obtained in step a1) and the heat-treated lignocellulose-containing biomass obtained in step b); a1) anaerobically fermenting the mixed, lignocellulose-containing biomass by means of microorganisms, and recovering the biogas formed; a2) performing a heat exchange operating on the countercurrent principle between the lignocellulose-containing biomass subjected to a first anaerobic fermentation obtained in step a1) and the heat-treated lignocellulose-containing biomass obtained in step b); b) further heating the lignocellulose-containing biomass heated in countercurrent from a2) to 130-200°C, preferably 150-180°C, and leaving the thus heated lignocellulose-containing biomass for a duration of 5-120 mins, preferably 10-30 mins, advantageously in a continuous flow reactor space for thermal digestion; c) anaerobically fermenting the heat-treated lignocellulose-containing biomass by means of microorganisms, and recovering the biogas formed; d) wherein the outflow after the fermentation c) is subjected at least in part to a phase separation; and e) a liquid phase in the form of process water is obtained from d), and this is recycled to the mixing of lignocellulose-containing biomass, in such a manner that the supply of fresh water in the biogas generation process and/or for mixing is at least considerably reduced or becomes completely unnecessary; and f) a solids-rich phase is formed from d), for example as organic fertilizer.