Spontaneous bacterial peritonitis (SBP) is one of the most frequent and severe complications in patients with decompensated cirrhosis. Early antibiotic therapy is extremely important for successful treatment and reducing mortality. Prostaglandin E2 (PGE2) is a regulator of the immune response and infection. This study aimed to explore whether ascitic PGE2 could be used as a marker for diagnosing SBP and predicting in-hospital mortality.Patients with cirrhosis and ascites undergoing abdominal paracentesis were enrolled in our study. Demographic, clinical, and laboratory parameters were recorded at the time of paracentesis and ascitic PGE2 levels were determined by ELISA. The correlation between ascitic PGE2 level and SBP as well as in-hospital mortality were analyzed.There were 224 patients enrolled, 29 (13%) patients diagnosed as SBP based on the current guideline criteria. The ascitic PGE2 level of patients with SBP [32.77 (26.5–39.68) pg/mL] was significantly lower than that of patients without SBP [49.72 (37.35–54.72) pg/mL]. In ROC analysis, the AUC of ascitic PGE2 for the diagnosis of SBP was 0.75, and the AUC of ascitic PGE2 combined with WBC and ascitic PGE2 combined with neutrophils were 0.90 and 0.90, respectively, which were significantly higher than that of ascitic PGE2. In multivariate analysis, ascites PGE2≤32.88 pg/mL (OR: 9.39; 95% CI: 1.41–67.44, P = .026), hepatic encephalopathy (OR: 18.39; 95% CI: 3.00–113.13, P = .002) and a higher MELD score (OR: 1.25; 95% CI: 1.05–1.40, P = .009) remained independent predictors of in-hospital mortality.Ascitic PGE2 level is likely to be a valuable marker in prediction of in-hospital mortality in patients with decompensated cirrhosis, and its value in diagnosis of SBP was not superior to other inflammatory indicators.