Ferroptosis is a novel form of membrane-dependent cell death that differs from other cell death modalities such as necrosis, apoptosis, and autophagy. Multiple sclerosis (MS) is a chronic inflammatory disease of the central nervous system primarily affecting brain and spinal cord neurons. Although the pathogenesis of these two conditions may seem unrelated, recent studies have indicated a connection between ferroptosis and multiple sclerosis. In fact, ferroptosis plays a significant role in the development of MS, as evidenced by the presence of elevated iron levels and iron metabolism abnormalities in the brains, spinal cords, and other neurons of MS patients. These abnormalities disrupt iron homeostasis within cells, leading to the occurrence of ferroptosis. However, there is currently a lack of research on the diagnostic value of ferroptosis-related genes in multiple sclerosis. In this study, we employed bioinformatics methods to identify ferroptosis-related genes (ATM, GSK3B, HMGCR, KLF2, MAPK1, NFE2L1, NRAS, PCBP1, PIK3CA, RPL8, VDAC3) associated with the diagnosis of multiple sclerosis and constructed a diagnostic model. The results demonstrated that the diagnostic model accurately identified the patients' condition. Subsequently, subgroup analysis was performed based on the expression levels of ferroptosis-related genes, dividing patients into high and low expression groups. The results showed differences in immune function and immune cell infiltration between the two groups. Our study not only confirms the correlation between ferroptosis and multiple sclerosis but also demonstrates the diagnostic value of ferroptosis-related genes in the disease. This provides guidance for clinical practice and direction for further mechanistic research.