The harvesting of microalgae is the main bottleneck of its large-scale biomass production, and seeking an efficient, green, and low-cost microalgae harvesting technology is one of the urgent problems to be solved. Microbubble air flotation has been proved to be an effective measure, but the generation of the right size of microbubbles and the mechanism of microbubbles-algal cells attachment are still unclear. In this study, microbubble air flotation was used as a harvesting method for Microcystis cultured in agricultural wastewater. The process mechanism of microbubble air flotation harvesting microalgae in wastewater was fully revealed from three aspects (the design of bubble formation, the adhesion law, and the recovery rate of microalgae under different working conditions). The results show that the length of the release pipe is the main factor affecting the proportion of microbubbles with particle size less than 50 μm. In the process of adhesion, when the particle size of microbubbles is 0.6~1.7 times the size of Microcystis, the adhesion efficiency of microbubbles to Microcystis is the highest. Under the conditions of pressure 0.45 MPa, gas-liquid ratio 5% and release pipe length 100 cm, the harvesting performance of Microcystis was the best. Microbubble air flotation has better harvesting performance of Microcystis with higher density. By understanding the mechanism of microbubble flotation, the technical parameters of microbubble flotation for harvesting energy microalgae are optimized to provide support for the development of efficient and low-cost devices and equipment for collecting microalgae.