The objective was to identify a set of genes whose transcript abundance is predictive of a cow’s ability to become pregnant following artificial insemination (AI). Endometrial epithelial cells from the uterine body were collected for RNA sequencing using the cytobrush method from 193 first-service Holstein cows at estrus prior to AI (day 0). A group of 253 first-service cows not used for cytobrush collection were controls. There was no effect of cytobrush collection on pregnancy outcomes at day 30 or 70 or on pregnancy loss between day 30 and 70. There were 2 upregulated and 214 downregulated genes (FDR < 0.05, absolute fold change >2-fold) for cows pregnant at day 30 versus those that were not pregnant. Functional terms overrepresented in the downregulated genes included those related to immune and inflammatory responses. Machine learning for fertility biomarkers with the R package BORUTA resulted in identification of 57 biomarkers that predicted pregnancy outcome at day 30 with an average accuracy of 77%. Thus, machine learning can identify predictive biomarkers of pregnancy in endometrium with high accuracy. Moreover, sampling of endometrial epithelium using the cytobrush can help understand functional characteristics of the endometrium at AI without compromising cow fertility. Functional characteristics of the genes comprising the set of biomarkers is indicative that a major determinant of cow fertility, at least for first insemination after calving, is immune status of the uterus, which, in turn, is likely to reflect the previous history of uterine disease.