The homeostasis regulating mechanism of endophyte enhancing cadmium (Cd) extraction by hyperaccumulator is poorly understood. Here, an endophyte strain E3 that belonged to Pseudomonas was screened from Cd hyperaccumulator Solanum nigrum L., which significantly improved the Cd phytoextraction efficiency of S. nigrum by 40.26%. The content and translocation factor of nutrient elements indicated that endophyte might regulate Cd accumulation by affecting the uptake and transport of magnesium and iron in S. nigrum. Gene transcriptional expression profile further revealed that SnMGT, SnIRT1, and SnIRT2, etc., were the key genes involved in the regulation of S. nigrum elements uptake by endophyte. However, changes in elemental homeostasis did not negatively affect plant growth. Endophyte inoculation promoted plant growth by fortifying photosynthesis as well as recruiting specific bacteria in S. nigrum endosphere, e.g., Pseudonocardiaceae, Halomonas. Notably, PICRUSt2 analysis and biochemical characterization jointly suggested that endophyte regulated starch degradation in S. nigrum leaves to maintain photosynthetic balance. Our results demonstrated that microecological characteristics of hyperaccumulator could be reshaped by endophyte, also the homeostasis regulation in endophyte enhanced hyperaccumulator Cd phytoextraction was significant.