Non-obstructive azoospermia is the most serious cause of male infertility. The testis has a special immunological environment, but the relationship between immune cells in the testicular microenvironment is still unclear. Therefore, it is urgent to identify the interaction mechanism and molecular determinants of immune cells in the testicular microenvironment. To further elucidate the etiology of azoospermia and provide a reference for the treatment of azoospermia. The GSE145467 and GSE9210 datasets were analyzed by Limma package, and then the differential genes were analyzed by enrichment analysis and protein-protein interaction analysis. In addition, we combined single-cell analysis(scRNA) to identify immune cell types and verified the expression of Hub genes in these immune cells. Finally, CellChat was used for cell-to-cell communication analysis. We found the distribution of immune cells in the microenvironment of Y chromosome AZF region microdeletions (AZFa_Del), idiopathic NOA (iNOA), and Klinefelter syndrome (KS) was significantly different from that of normal adults, especially monocytes/macrophages. In normal subjects, monocytes/macrophages mainly played the role of the signal source, while in patients with azoospermia, monocytes/macrophages mainly received signals from other immune cells. Monocytes/macrophages in AZFa_Del, iNOA, and KS communicated with other immune cells mainly through MDK-LRP1, PTN-NCL, and MDK-NCL ligand-receptor pairs respectively. Our research provides new ideas for the pathogenesis and treatment of azoospermia.