Background: Whether nebulized polymyxin B should be used as an adjunctive therapy or substitution strategy to intravenous polymyxin B for the treatment of ventilator-associated pneumonia (VAP) remains controversial. This study's aim is to evaluate the efficacy and safety of different administration ways of polymyxin B in the treatment of ventilator-associated pneumonia caused by extensively drug-resistant Gram-negative bacteria(XDR-GNB). Methods: This retrospective cohort study enrolled ventilator-associated pneumonia patients caused by XDR-GNB treated with polymyxin B in the intensive care unit. Patients were categorized by the administration methods as intravenous (IV) group, inhaled (IH) group, and the intravenous combined with inhaled (IV + IH) group. Microbiological outcome and clinical outcome were compared in each group. The side effects were also explored. Results: A total of 111 patients were enrolled and there was no difference in demographic and clinical characteristics among the three groups. In terms of efficacy, clinical cure or improvement was achieved in 21 patients (55.3%) in the intravenous group, 19 patients (50%) in the IH group, and 20 patients (57.1%) in IV + IH group (p = 0.815). All three groups showed high success rates in microbiological eradication, as 29 patients with negative cultures after medication in inhaled group. Among all the patients who had negative bacterial cultures after polymyxin B, the inhaled group had significantly shorter clearance time than the intravenous group (p = 0.002), but with no significant difference in 28-day mortality. Compared with intravenous group, a trend towards a lower risk of acute kidney injury was observed in inhaled group (p = 0.025). Conclusion: From the perspective of minimal systemic renal toxicity, nebulized polymyxin B as a substitution strategy to intravenous polymyxin B for the treatment of ventilator-associated pneumonia caused by XDR-GNB is feasible.