Wheat straw and coffee husk are agricultural residues that may be successfully exploited for energy generation through anaerobic digestion. Improper handling of biogas-producing facilities can result in methane emissions, a potent greenhouse gas that may outweigh some environmental benefits. As a result, the environmental pollution issue raising exponentially, the usage of organic wastes becomes today's scenario to overcome the environmental issue. The quest for alternative energy supplies, especially those extracted from renewable materials like biomass is sparked by rising global energy demand and the gradual decline of oil reserves. In this study, two experiments are focused on the combined impact of co-digestion and thermal pretreatment of wheat straw blended with coffee husk biomass. Wheat straw and coffee husk wastes were analysed and used as biogas sources to generate energy. The volatile solid which was pretreated at 160°C temperature, 3% concentration of sulphuric acid, resulted in 30 minutes of cooking time by using biogas. The biomass system yielded is biogas and biomethane, with 764 and 460 mL/g. The biogas energy generated could be used to replace fossil fuels for a variety of purposes, reducing emissions and promoting the country's long-term sustainability. Furthermore, the experimental data obtained from both experiments are validated.