Unicellular algae, termed phytoplankton, greatly impact the marine environment by serving as the basis of marine food webs and by playing central roles in the biogeochemical cycling of elements. The interactions between phytoplankton and heterotrophic bacteria affect the fitness of both partners. It is becoming increasingly recognized that metabolic exchange determines the nature of such interactions, but the underlying molecular mechanisms remain underexplored. Here, we investigated the molecular and metabolic basis for the bacterial lifestyle switch, from coexistence to pathogenicity, in Sulfitobacter D7 during its interaction with Emiliania huxleyi, a cosmopolitan bloom-forming phytoplankter. To unravel the bacterial lifestyle switch, we analyzed bacterial transcriptomes in response to exudates derived from algae in exponential growth and stationary phase, which supported the Sulfitobacter D7 coexistence and pathogenicity lifestyles, respectively. In pathogenic mode, Sulfitobacter D7 upregulated flagellar motility and diverse transport systems, presumably to maximize assimilation of E. huxleyi-derived metabolites released by algal cells upon cell death. Algal dimethylsulfoniopropionate (DMSP) was a pivotal signaling molecule that mediated the transition between the lifestyles, supporting our previous findings. However, the coexisting and pathogenic lifestyles were evident only in the presence of additional algal metabolites. Specifically, we discovered that algae-produced benzoate promoted the growth of Sulfitobacter D7 and hindered the DMSP-induced lifestyle switch to pathogenicity, demonstrating that benzoate is important for maintaining the coexistence of algae and bacteria. We propose that bacteria can sense the physiological state of the algal host through changes in the metabolic composition, which will determine the bacterial lifestyle during interaction.