The cultivation of microalgae integrated with the treatment of wastewater has been developed for the generation of sustainable biomass and the remediation of wastewater. However, harvesting microalgae biomass from the culture system remains an energy-intensive challenge. In this research work, we have investigated the integration of microalgae culture with municipal wastewater (MWW) treatment and biomass bio-flocculation by filamentous fungi. A drop in the high nutrient load in terms of TKN (95.40%) and IP (97.11%) was noticed at 14 days in MWW integrated with microalgae culture. Also, the synergistic influence of microalgae and indigenous bacteria in MWW leads to the deduction of BOD (81.78%), COD (83.67%), and TOC (70.26%). The bio-harvested biomass was used to produce biofuel via hydrothermal liquefaction (250–350 °C). The natively adapted filamentous fungi (A. niger Ind-Jiht-5) were isolated from the substrate of the wastewater habitats. The results have shown that microalgae have adapted well to MWW and have improved biomass production by approximately 29%. This bio-flocculation denotes a facile bio-harvesting technique with a maximum efficiency of ∼90% in 24 h using granulated filamentous fungi. Moreover, the bio-harvested microalgae biomass has been accompanied by a lipid increase of ∼26%. The maximum yield of bio-oil (∼17%) in the bio-harvested microalgae biomass was obtained at 350 °C. The C (∼61%) and HHV (∼29%) content of the bio-oil was greater than the biomass and biochar. The bio-flocculation approach has demonstrated an efficient and sustainable technique to harvest biomass to produce renewable biofuels via hydrothermal liquefaction. © 2022 The Author(s)