Integrated aquaculture wastewater treatment systems (IAWTSs) are widely used in treating aquaculture wastewater with the aeration-microalgae unit serving as an important component. In this study, we artificially constructed an IAWTS and applied two aeration-microalgae methods: ordinary aeration or ozone nanobubbles (ONBs) with microalgae (Nannochloropsis oculata). The impact of N.oculata and ONBs on the removal performance of nutrients and the underlying micro-ecological mechanisms were investigated using 16S rRNA gene amplicon sequencing. The results demonstrated that the combined use of ONBs and N.oculata exhibited superior purification effects with 78.25%, 76.59% and 86.71% removal of CODMn, TN and TP. N.oculata played a pivotal role as the primary element in wastewater purification, while ONBs influenced nutrient dynamics by affecting both N.oculata and bacterial communities. N.oculata actively shaped bacterial communities, with a specific focus on nitrogen and phosphorus cycling in the micro-environment remodeled by ONBs. Rare bacterial communities displayed heightened activity in response to the changes in N.oculata, ONBs, and nutrient levels. These findings provide a novel approach to improve the technological processes the IAWTS, contributing to the advancement of sustainable aquaculture practices by offering valuable insights into wastewater purification efficiency and micro-ecological mechanisms.