BackgroundAutism spectrum disorder (ASD) is a neurodevelopmental disorder that is difficult to diagnose. Inflammatory bowel disease (IBD) is a common chronic digestive disease. Previous studies have shown a potential correlation between ASD and IBD, but the pathophysiological mechanism remains unclear. The purpose of this research was to examine the biological mechanisms underlying the differentially expressed genes (DEGs) of ASD and IBD using bioinformatics tools.MethodsLimma software was used to evaluate the DEGs between ASD and IBD. The GSE3365, GSE18123, and GSE150115 microarray data sets were acquired from the Gene Expression Omnibus (GEO) database. We then performed 6 analyses, namely, Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) functional annotation; weighted gene coexpression network analysis; correlation analysis of hub genes with autophagy, ferroptosis and immunity; transcriptional regulation analysis of hub genes; single-cell sequencing analysis; and potential therapeutic drug prediction.ResultsA total of 505 DEGs associated with ASD and 616 DEGs associated with IBD were identified, and 7 genes overlapped between these sets. GO and KEGG analyses revealed several pathways enriched in both diseases. A total of 98 common genes related to ASD and IBD were identified by weighted gene coexpression network analysis (WGCNA), and 4 hub genes were obtained by intersection with the 7 intersecting DEGs, which were PDGFC, CA2, GUCY1B3 and SDPR. We also found that 4 hub genes in the two diseases were related to autophagy, ferroptosis or immune factors. In addition, motif–TF annotation analysis showed that cisbp__M0080 was the most relevant motif. We also used the Connectivity Map (CMap) database to identify 4 potential therapeutic agents.ConclusionThis research reveals the shared pathogenesis of ASD and IBD. In the future, these common hub genes may provide new targets for further mechanistic research as well as new therapies for patients with ASD and IBD.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12967-023-04218-z.