Ustekinumab (UST), a biologic against interleukin (IL)-12/23, is commonly used to treat Crohn's disease (CD). Myofibroblast (MF) is known as one of the most important factors causing intestinal fibrosis, and UST has been reported to alleviate this condition. However, the genetic mechanisms underlying UST's effects on CD remain unclear. This study uses bioinformatics tools to analyze the genes and potential pathways affected by UST in CD, with a focus on its anti-fibrosis effects, providing insights into new therapeutic targets. The data downloaded from the Gene Expression Omnibus (GEO) database were analyzed to screen for differentially expressed genes (DEGs). Various machine learning strategies, including the least absolute shrinkage and selection operator (LASSO), support vector machine (SVM), and random forest (RF), were employed to screen for key genes among the DEGs. Functional and pathway enrichment analyses were conducted, and key genes associated with myofibroblast (MF) activity were screened. Finally, endoscopic surgical specimens from CD patients and healthy participants were collected to assess the expression levels of collagen and key genes in intestinal tissues using hematoxylin-eosin (H&E), Masson staining, and immunohistochemistry. A total of 1,341 DEGs associated with CD were identified. Among them, 738 genes showed low expression in healthy populations but high expression in patients with CD, reduced expression after the treatment of UST. In contrast, 603 genes exhibited high expression in healthy individuals, showed low expression in CD patients, and increased expression after UST treatment. Functional and pathway analysis showed that DEGs were mainly concentrated in response to foreign biological stimuli and bacterial-derived molecules. DEGs are mainly enriched in chemokines, TNF, IL-17, and other signaling pathways. Seven key genes were identified: NCRNA00236, LOC730101, ORP3, XG, UBFD1, KDELC1, and RBP7. Single-cell analysis revealed that KDELC1 was closely related to MF activity. MFs with high KDELC1 expression were significantly enriched in biological functions, signaling pathways, and metabolic processes that promote fibrosis. The experiment showed that UST treatment helped maintain the integrity of intestinal tissue structure, reducing the expression levels of collagen I, KDELC1, and the severity of intestinal fibrosis. The functional and pathway analysis reiterated that DEGs were largely focused on responses to foreign biological stimuli and bacterial-derived molecules, as well as signaling pathways such as chemokines, TNF, and IL-17. Of the identified genes, KDELC1 showed a particularly strong correlation with MF activity in single-cell analysis (R = 0.33, p = 3.2e-07). MFs with high KDELC1 expression were closely linked to pathways promoting fibrosis progression, including TGF-β, epithelial-mesenchymal transformation, TNF/NF-κB, and related metabolic pathways such as vitamin B6 and arginine. KDELC1 plays a key role in regulating multiple biological functions, including signaling pathways related to MF. UST alleviates intestinal fibrosis by targeting KDELC1, thereby influencing intramuscular fat metabolism and intercellular communication.