Ovarian cancer (OC) is a malignancy with poor prognosis, stubborn resistance, and frequent recurrence. Recently, it has been widely recognized that immune-related genes (IRGs) have demonstrated their indispensable importance in the occurrence and progression of OC. Given this, this study aimed to identify IRGs with predictive value and build a prognostic model for a more accurate assessment. First, we obtained transcriptome and clinical information of ovarian samples from both TCGA and GTEx databases. After integration, we figured out 10 genes as immune-related prognostic genes (IRPGs) by performing the univariate Cox regression analysis. Subsequently, we established a TF-associated network to investigate its internal mechanism. The prognosis model consisting of 5 IRPGs was constructed later by lasso regression analysis. The comparison of the score with the clinical factors validated its independence and superiority in OC's prognosis. Moreover, the association between the signature and immune cell infiltration demonstrated its ability to image the immune situation of the tumor microenvironment. Finally, the reliability of the risk model was confirmed by the GEO cohort. Together, our study has constructed an independent prognostic model for OC, which may deepen the understanding of the immune microenvironment and help present novel biomarkers or ideas for targeted therapy.