Abstract In aquatic invertebrates, hemolymph is critical for host–environment interaction. Although maintaining microbial homeostasis in hemolymph is significant for disease pathogenesis, the key regulatory mechanisms remain elusive. This study investigates the essential role of the respiratory glycoprotein hemocyanin (HMC) in modulating hemolymph microbial composition in penaeid shrimp. Hemocyanin-depleted shrimp infected with Vibrio parahaemolyticus (Vp) exhibited disruptions in the niacinamide (NAM) salvage pathway, attenuated plasma niacinamide and nicotinamide adenine dinucleotide (NAD) levels, and reduced transcripts of key enzymes. These alterations correlated with an increased total bacterial load and a higher abundance of opportunistic pathogens like Vibrio and Shewanella. Hemocyanin likely modulates niacinamide metabolism through interactions with Litopenaeus vannamei nicotinamide riboside kinase 1 (LvNRK1), sirtuin 2 (LvSIRT2), and sirtuin 6 (LvSIRT6). Remarkably, niacinamide supplementation after hemocyanin knockdown restored hemolymph microbial balance, reduced Vibrio dominance, and improved shrimp survival against V. parahaemolyticus infection, but not Gram-positive Staphylococcus aureus (Sa). These findings provide novel insights into the pivotal role of niacinamide metabolism in regulating shrimp hemolymph microbial composition via hemocyanin.