The objective of this study was to discern ferroptosis-related genes (FRGs) linked to non-obstructive azoospermia and investigate the associated molecular mechanisms. A dataset related to azoospermia was retrieved from the Gene Expression Omnibus database, and FRGs were sourced from GeneCards. Ferroptosis-related differentially expressed genes (FRDEGs) were discerned. Subsequently, these genes underwent analyses encompassing Gene Ontology and Kyoto Encyclopedia of Genes and Genomes, as well as protein-protein interaction (PPI) networks and assessments of functional similarity. Following the identification of hub genes, an exploration of immune infiltration, single-cell expression, diagnostic utility, and interactions involving hub genes, RNA-binding proteins (RBPs), transcription factors (TFs), microRNAs (miRNAs), and drugs was conducted. A total of 35 differentially expressed FRGs were discerned. These genes demonstrated enrichment in functions and pathways associated with ferroptosis. From the PPI network, eight hub genes were selected. Functional similarity analysis highlighted the potential pivotal roles of HMOX1 and GPX4 in azoospermia. Analysis of immune cell infiltration indicated a significant decrease in activated dendritic cells in the azoospermia group, with notable correlations between hub genes, particularly SAT1 and HMGCR, and immune cell infiltration. Unique expression patterns of hub genes across various cell types in the human testis were observed, with GPX4 prominently enriched in spermatid/sperm. Eight hub genes exhibited robust diagnostic value (AUC > 0.75). Lastly, a comprehensive hub gene-miRNA-TF-RBP-drug network was constructed. In summary, our investigation unveiled eight FRDEGs associated with azoospermia, which hold potential as biomarkers for the diagnosis and treatment of azoospermia.