BackgroundUnderstanding the ecological and environmental functions of phototrophic biofilms in the biological crust is crucial for improving metal(loid) (e.g.Cd, As) bioremediation in mining ecosystems. In this study, in combination with metal(loid) monitoring and metagenomic analysis, we systematically evaluated the effect of biofilm in a novel biological aqua crust (biogenic aqua crust—BAC) onin situmetal(loid) bioremediation of a representative Pb/Zn tailing pond.ResultsWe observed strong accumulation of potentially bioavailable metal(loid)s and visible phototrophic biofilms in the BAC. Furthermore, dominating taxaLeptolyngbyaceae(10.2–10.4%,Cyanobacteria) andCytophagales(12.3–22.1%,Bacteroidota) were enriched in biofilm. Along with predominant heterotrophs (e.g. Cytophagalessp.) as well as diazotrophs (e.g. Hyphomonadaceaesp.), autotrophs/diazotrophs (e.g. Leptolyngbyaceaesp.) in phototrophic biofilm enriched the genes encoding extracellular peptidase (e.g.family S9, S1), CAZymes (e.g.CBM50, GT2) and biofilm formation (e.g. OmpR,CRPandLuxS), thus enhancing the capacity of nutrient accumulation and metal(loid) bioremediation in BAC system.ConclusionsOur study demonstrated that a phototrophic/diazotrophic biofilm constitutes the structured communities containing specific autotrophs (e.g. Leptolyngbyaceaesp.) and heterotrophs (e.g. Cytophagalessp.), which effectively control metal(loid) and nutrient input using solar energy in aquatic environments. Elucidation of the mechanisms of biofilm formation coupled with metal(loid) immobilization in BAC expands the fundamental understanding of the geochemical fate of metal(loid)s, which may be harnessed to enhancein situmetal(loid) bioremediation in the aquatic ecosystem of the mining area.Video AbstractSupplementary InformationThe online version contains supplementary material available at 10.1186/s40168-023-01549-3.