Introduction In marine ecosystems, microbial communities are important drivers of material circulation and energy flow. The complex interactions between phytoplankton and bacterial communities constitute one of the most crucial ecological relationships in the marine environment. Inorganic nitrogen can affect the type of relationship between algae and bacteria. However, the quantitative relationship between the bacterial communities, inorganic nitrogen, and phytoplankton remains unclear. Methods Under laboratory conditions, we altered the forms (nitrate and ammonium) and amounts of nitrogen sources to study the dynamics of bacterial biomass, diversity, and community structure in the phycosphere of the marine model species Phaeodactylum tricornutum. The bacterial community structure during P. tricornutum growth was analyzed using Illumina HiSeq sequencing of 16S rDNA amplicons. Results The results indicated that inorganic nitrogen concentration was the main factor promoting P. tricornutum biomass growth. The change in the algal biomass would significantly increase the phycosphere bacterial biomass. The bacterial biomass in the algal-bacteria co-culture system was 1.5 ~ 5 times that of the conditional control groups without microalgae under the same culture conditions. The variation of P. tricornutum biomass also affected the bacterial communities in the phycosphere. When P. tricornutum was in the exponential phase (96 ~ 192 h), the bacterial community structure differed between the high- and low-concentration groups. The difference in the bacterial communities over time in the high-concentration groups was more prominent than in the low-concentration groups. Under high-concentration groups (HA and HN), the relative abundance of Marivita and Marinobacter, engaged in the transformation of aquatic inorganic nitrogen, gradually decreased with time. However, the relative abundance of Oceanicaulis, closely related to algal growth, gradually increased with time. Discussion The above phenomena might be related to the change in P. tricornutum biomass. Our results explain when and how the phycosphere bacterial communities responded to algal biomass variations. The study provides a foundation for the quantitative relationship among nutrients, microalgae, and bacteria in this system.