Background Homeobox D (HOXD) genes were associated with cancer pathogenesis. However, the role of HOXD genes in ovarian cancer (OC) and the possible mechanisms involved are unclear. In this study, we analyzed the function and regulatory mechanisms and functions of HOXD genes in OC based on comprehensive bioinformatics analysis. Methods Expression of HOXD1/3/4/8/9/10/11/12/13 mRNA was analyzed between OC tissue and normal tissue using ONCOMINE, GEO, and TCGA databases. The relationship between HOXD expression and clinical stage was studied by GEPIA. The Kaplan-Meier plotter was used to analyze prognosis. cBioPortal was used to analyze the mutation and coexpression of HOXDs. GO and KEGG analyses were performed by the DAVID software to predict the function of HOXD coexpression genes. Immune infiltration analysis was used to evaluate the relationship between the expression of HOXD genes and 24 immune infiltrating cells. Results The expression of HOXD3/4/8/9/10/11 was significantly lower in OC tissues than in normal ovarian tissues, while the expression of HOXD1/12/13 was significantly higher in OC tissues. The expression of HOXD genes was associated with FIGO stage, primary therapy outcome, tumor status, anatomic neoplasm subdivision, and age. The expression levels of HOXD1/3/4/8/9/10 correlated with tumor stage. HOXD1/8/9 could be served as ideal biomarkers to distinguish OC from normal tissue. Low HOXD9 expression was associated with shorter overall survival (OS) (HR: 0.75; 95% CI: 0.58–0.98; P = 0.034) and progression-free survival (PFS) (HR: 0.69; 95% CI: 0.54–0.87; P = 0.002). The HOXD coexpression genes were associated with pathways including cell cycle, TGF-beta signaling pathway, cellular senescence, and Hippo signaling pathway. HOXD genes were significantly associated with immune infiltration. Conclusion The expression of HOXD genes is associated with clinical characteristics. HOXD9 is a new biomarker of prognosis in OC, and HOXD1/4/8/9/10 may be potential therapeutic targets. The members of the HOXD genes may be the response to immunotherapy for OC.