Objective To use peripheral blood transcriptome data to identify stroke-related ferroptosis key genes and establish an early diagnostic model. Methods The GSE58294 dataset from the Gene Expression Omnibus database was used as the training set, and the GSE202518 dataset was used for validation. Differentially expressed genes (DEGs) were identified and intersected with the ferroptosis-related gene set from FerrDb to obtain key genes. Functional enrichment analysis was performed using gene ontology and Kyoto Encyclopedia of Genes and Genomes. A risk prediction model was built using the Ridge regression algorithm and evaluated via cross-validation and independent validation. Results A total of 649 significant DEGs were identified. Intersection with the ferroptosis gene set yielded five key genes: MAPK1, SP1, MAPK14, STAT3, and PTGS2. Functional enrichment analysis revealed their significant involvement in core stroke pathways, including inflammatory response regulation and the MAPK signaling pathway. The Ridge regression model based on these five genes achieved an area under the curve of 0.968 in the training set and 0.854 in the independent validation set. Conclusion The five-gene diagnostic model demonstrated robust performance, laying the groundwork for non-invasive early stroke diagnosis.