Intrauterine growth restriction (IUGR) is a common perinatal complication in animal reproduction, with long-lasting negative effects on neonates and postnatal animals, which seriously negatively affects livestock production. In this study, we aimed to identify potential genes associated with the diagnosis of IUGR through bioinformatics analysis. Based on the 73 differentially expressed related genes obtained by differential analysis and weighted gene co-expression network analysis, we used three machine learning algorithms to identify 4 IUGR-related hub genes (IUGR-HGs), namely, ADAM9, CRYL1, NDP52, and SERPINA7, whose ROC curves showed that they are a good diagnostic target for IUGR. Next, we identified two molecular subtypes of IUGR through consensus clustering analysis and constructed a gene scoring system based on the IUGR-HGs. The results showed that the IUGR score was positively correlated with the risk of IUGR. The AUC value of IUGR scoring accuracy was 0.970. Finally, we constructed a new artificial neural network model based on the four IUGR-HGs to diagnose sheep IUGR, and its accuracy reached 0.956. In conclusion, the IUGR-HGs we identified provide new potential molecular markers and models for the diagnosis of IUGR in sheep; they can better diagnose whether sheep have IUGR. The present findings provide new perspectives on the diagnosis of IUGR.