Local immune status is influenced by the tumor microenvironment. This study aims to characterize the local immune/microenvironment status by examining tumor-infiltrating immune cells, as well as cyclooxygenase (COX) expression in tumor cells, and to analyze the relationship with the prognosis of ovarian cancers. Using immunohistochemical staining of 70 ovarian cancer specimens, the numbers of CD8 þ , CD57 þ , and CD1a þ cells infiltrating intraepithelial or stromal spaces were counted (six parameters). Hierarchical clustering was used to analyze the six parameters at one time. Expression of COX-1 and COX-2 in tumor cells was also analyzed by immunohistochemistry. Expression of both COX-1 and COX-2 was negatively correlated with intraepithelial CD8 þ cells (Po0.05 for both). Hierarchical clustering using the six parameters classified ovarian cancers into three clusters. The overall and progression-free survival of cluster 1 with low CD8 þ cell and high CD1a þ cell density was poorer than cluster 2 with high CD8 þ cell density (Po0.05). The cluster classification did not correlate with clinical features, such as histology, stage, age, and amount of residual tumor. In a multivariate analysis, cluster 1 was an independent poor prognostic factor (Po0.05). Expression of both COX-1 and COX-2 was higher in cluster 1 than in cluster 2 (Po0.05, respectively). In conclusion, hierarchical clustering of tumor-infiltrating immune cells allows poor prognostic COX-high subgroup of ovarian cancer to be detected. COX may influence the pattern of tumor-infiltrating immune cells and prognosis in ovarian cancer.