Nitrogen fixation, occurring through the symbiotic relationship between legumes and rhizobia in root nodules, is crucial in sustainable agriculture. Nodulation and soybean production are influenced by low levels of phosphorus stress. In this study, we discovered a MADS transcription factor, GmAGL82, which is preferentially expressed in nodules and displays significantly increased expression under conditions of phosphate (Pi) deficiency. The overexpression of GmAGL82 in composite transgenic plants resulted in an increased number of nodules, higher fresh weight, and enhanced soluble Pi concentration, which subsequently increased the nitrogen content, phosphorus content, and overall growth of soybean plants. Additionally, transcriptome analysis revealed that the overexpression of GmAGL82 significantly upregulated the expression of genes associated with nodule growth, such as GmENOD100, GmHSP17.1, GmHSP17.9, GmSPX5, and GmPIN9d. Based on these findings, we concluded that GmAGL82 likely participates in the phosphorus signaling pathway and positively regulates nodulation in soybeans. The findings of this research may lay the theoretical groundwork for further studies and candidate gene resources for the genetic improvement of nutrient-efficient soybean varieties in acidic soils.