Objective: To identify potential diagnostic markers for ovarian cancer (OC) and explore the contribution of immune cells infiltration to the pathogenesis of OC. Methods: As the study cohort, two gene expression datasets of human OC (GSE27651 and GSE26712, taken as the metadata) taken from the Gene Expression Omnibus (GEO) database were combined, comprising 228 OC and 16 control samples. Analysis was performed to identify the differentially expressed genes between the OC and control samples, while support vector machine analysis using the recursive feature elimination algorithm and least absolute shrinkage and selection operator regression were performed to identify candidate biomarkers that could discriminate OC. In addition, immunohistochemistry staining was performed to verify the diagnostic value and protein expression levels of the candidate biomarkers. The GSE146553 dataset (OC n = 40, control n = 3) was used to further validate the diagnostic values of those biomarkers. Further, the proportions of various immune cells infiltration in the OC and control samples were evaluated using the CIBERSORT algorithm. Results: CLEC4M, PFKP, and SCRIB were identified as potential diagnostic markers for OC in both the metadata (area under the receiver operating characteristic curve [AUC] = 0.996, AUC = 1.000, AUC = 1.000) and GSE146553 dataset (AUC = 0.983, AUC = 0.975, AUC = 0.892). Regarding immune cell infiltration, there was an increase in the infiltration of follicular helper dendritic cells, and a decrease in the infiltration of M2 macrophages and neutrophils, as well as activated natural killer (NK) cells and T cells in OC. CLEC4M showed a significantly positive correlation with neutrophils (r = 0.57, p < 0.001) and resting NK cells (r = 0.42, p = 0.0047), but a negative correlation with activated dendritic cells (r = -0.33, p = 0.032). PFKP displayed a significantly positive correlation with activated NK cells (r = 0.36, p = 0.016) and follicular helper T cells (r = 0.32, p = 0.035), but a negative correlation with the naive B cells (r = -0.3, p = 0.049) and resting NK cells (r = -0.41, p = 0.007). SCRIB demonstrated a significantly positive correlation with plasma cells (r = 0.39, p = 0.01), memory B cells (r = 0.34, p = 0.025), and follicular helper T cells (r = 0.31, p = 0.04), but a negative correlation with neutrophils (r = -0.46, p = 0.002) and naive B cells (r = -0.48, p = 0.0012). Conclusion: CLEC4M, PFKP, and SCRIB were identified and verified as potential diagnostic biomarkers for OC. This work and identification of the three biomarkers may provide guidance for future studies into the mechanism and treatment of OC.