Doripenem shows good invitro activity against common nosocomial pathogens, such as extended-spectrum β-lactamase (ESBL)-producing Enterobacteriaceae, Pseudomonas aeruginosa, and Acinetobacter baumannii. However, the use of doripenem for hospital-acquired pneumonia (HAP) and ventilator-associated pneumonia (VAP) remains controversial. The aim of this study was to compare the efficacy and safety between doripenem and meropenem for patients with HAP or VAP. Adult patients diagnosed with HAP and VAP at National Taiwan University Hospital, who received doripenem or meropenem for more than 48h between January 2015 and November 2017, were retrospectively reviewed. All-cause mortality on the 30th day was used as the primary outcome measurements. Fifty-seven patients with doripenem and 252 patients with meropenem were analyzed. Compared to the meropenem group, the doripenem group was younger and had a higher Sequential Organ Failure Assessment (SOFA) score. Multivariable Cox regression analysis revealed that presence of solid organ malignancies (adjusted hazard ratio [AHR], 1.82; 95% CI, 1.04-3.19, p=0.003) and SOFA score (AHR, 1.10; 95% CI, 1.03-1.17, p=0.003) were independent factors associated with mortality. There was no survival difference of 30-day mortality between patients receiving doripenem and meropenem for HAP or VAP (log-rank p=0.113). However, a poorer outcome was observed among patients with hematological disease in the doripenem group (log-rank p=0.012). Our results demonstrate that doripenem has similar efficacy as meropenem in HAP or VAP patients. With an aim to enhance antibiotic diversity, doripenem could be an alternative choice for patients with HAP or VAP, except for those with hematological malignancies.