Objective: To investigate and validate ferroptosis genes (FRGs) in ulcerative colitis (UC) for diagnostic, subtype, and biological agent reactivity, with the goal of providing a foundation for the identification of novel therapeutic targets and the rational use of infliximab in clinical practice. Methods: UC datasets and FRGs were selected from the Gene Expression Omnibus (GEO) and FerrDb databases. WGCNA was used to identify characteristic genes of UC. LASSO and SVM models were used to discover key FRGs in UC. A nomogram was constructed for diagnosing UC using logistic regression (LR), We performed internal and external validation for the model. Furthermore, we constructed a hub-gene-signature prediction model for the effectiveness of infliximab in treating UC and deployed it on the website. Finally, the hub gene-drug interaction networks were constructed. Results: Nineteen ferroptosis-related genes associated with UC were identified through bioinformatics analysis. FTH1 and GPX4 were two of the down-regulated genes.The seventeen upregulated genes consisted of DUOX1, DUOX2, SOCS1, LPIN1, QSOX1, TRIM21, IDO1, SLC7A11, MUC1, HSPA5, SCD, ACSL3, NOS2, PARP9, PARP14, LCN2, and TRIB2. Five hub genes, including LCN2, QSOX1, MUC1, IDO1, and TRIB2, were acquried via machine learning. The mean auc of internal validation was 0.964 and 0.965 respectively, after using cross-validation and bootstrap in the training set based on the 5 hub-gene diagnostic models. In the external validation set, the AUC reached 0.976 and 0.858. RF model performs best in predicting infliximab effectiveness. In addition, we identified two ferroptosis subtypes. Cluster A mostly overlaps with the high-risk score group, with a hyperinflammatory phenotype. method: UC datasets and FRGs were selected from the Gene Expression Omnibus (GEO) and FerrDb databases. WGCNA was used to identify characteristic genes of UC. LASSO and SVM models were used to discover key FRGs in UC. A nomogram was constructed for diagnosing UC using logistic regression (LR), We performed internal and external validation for the model. Furthermore, we constructed a 5 hub-gene-signature prediction model for the effectiveness of infliximab in treating UC and deployed it on the web site. Finally, 5 hub gene-drug interaction networks were constructed. Conclusions: This research indicated that five hub genes related to ferroptosis might be potential markers in diagnosing and predicting infliximab sensitivity for UC. result: A total of 362 genes were found to be closely associated with UC . These genes were enriched in immune response, response to stress, oxidoreductase activity, glycerolipid metabolism, ferroptosis, etc. Five ferroptosis-related hub genes were identified through machine learning, including LCN2, QSOX1, MUC1, IDO1, and TRIB2. The mean auc of internal validation was 0.964 and 0.965 respectively, after using cross-validation and booststrap in the training set. In the external validation set, the AUC of the diagnostic model reached 0.858. RF model performs best in predicting infliximab effectiveness. In addition, we identified two ferroptosis subtypes. ClusterA mostly overlaps with the highrisk score group, with a hyperinflammatory phenotype. conclusion: This research indicated that five hub genes related to ferroptosis might be potential markers in diagnosing and predicting infliximab sensitivity for UC.