Objective. To investigate whether prior treatment of atorvastatin reduces the frequency of hospital acquired pneumonia (HAP). Methods. Totally, 492 patients with acute ischemic stroke and Glasgow Coma Scale ≤ 8 were enrolled in this study. Subjects were assigned to prior atorvastatin treatment group (n = 268, PG) and no prior treatment group (n = 224, NG). All the patients were given 20 mg atorvastatin every night during their hospital stay. HAP frequency and 28-day mortality were measured. Levels of inflammatory biomarkers [white blood cell (WBC), procalcitonin (PCT), tumor necrosis factor-alpha (TNF-α), and interleukin-6 (IL-6)] were tested. Results. There was no significant difference in the incidence of HAP between PG and NG (25.74% versus. 24.55%, p > 0.05) and 28-day mortality (50.72% versus 58.18%, p > 0.05). However, prior statin treatment did modify the mortality of ventilator associated pneumonia (VAP) (36.54% versus 58.14%, p = 0.041) and proved to be a protective factor (HR, 0.564; 95% CI, 0.310~0.825, p = 0.038). Concentrations of TNF-α and IL-6 in PG VAP cases were lower than those in NG VAP cases (p < 0.01). Conclusions. Prior atorvastatin treatment in patients with ischemic stroke was associated with a lower concentration of IL-6 and TNF-α and improved the outcome of VAP. This clinical study has been registered with ChiCTR-ROC-17010633 in Chinese Clinical Trial Registry.