Biofilms drive crucial ecosystem processes in rivers. This study provided the basis for overall quantitative calculations about the contribution of biofilms to the nitrogen cycle. At the early stage of biofilm formation, dissolved oxygen (DO) could penetrate the biofilms. As the biofilm grew and the thickness increased, then the mass transfer of DO was restricted. The microaerobic layer firstly appeared in biofilm under the turbulent flow conditions, with the appearance of the microaerobic and anaerobic layer, the nitrification and denitrification reaction could proceed smoothly in biofilm. And the removal efficiency of total nitrogen (TN) increased as the biofilm matured. Under the turbulent flow conditions, mature biofilms had the smallest thickness, but the highest proportion the anaerobic layer to the biofilm thickness, the highest density, and the highest nitrogen removal efficiency. However, the nitrogen removal efficiency of biofilm was the lowest under laminar flow conditions. The difference of layered structure of biofilm and the DO flux in biofilm explained the difference of nitrogen migration and transformation in river water under different hydrodynamic conditions. This study would help control the growth of biofilm and improve the nitrogen removal capacity of biofilm by regulating hydrodynamic conditions. [Display omitted] • Hydrodynamics significantly affecting the formation and properties of biofilms in river. • Five obvious stages were observed during the biofilm formation. • The difference of layered structure of biofilm and the DO flux in biofilm explained the difference of nitrogen migration and transformation in river water under different hydrodynamic conditions. • The removal efficiency of nitrogen by the mature biofilm under the turbulent condition was the highest and that was the lowest under the laminar condition. [ABSTRACT FROM AUTHOR]