Introduction: Macrolides have anti-inflammatory and immunomodulatory properties that give this class of antibiotics a role that differs from its classical use as an antibiotic, which opens new therapeutic possibilities. Objective: The aim of this study was to evaluate the anti-inflammatory effect of azithromycin in preventing mechanical ventilation (MV)-induced lung injury in very-low-birth-weight preterm neonates. Methods: This is a randomized, double-blind, placebo-controlled trial of preterm neonates who received invasive MV within 72 h of birth. Patients were randomized to receive intravenous azithromycin (at a dose of 10/mg/kg/day for 5 days) or placebo (0.9% saline) within 12 h of the start of MV. Two blood samples were collected (before and after intervention) for measurement of interleukins (ILs) and PCR for Ureaplasma. Patients were followed up throughout the hospital stay for the outcomes of death and bronchopulmonary dysplasia defined as need for oxygen for a period of ≥28 days of life (registered at ClinicalTrials.gov, No. NCT03485703). Results: Forty patients were analyzed in the azithromycin group and 40 in the placebo group. Five days after the last dose, serum IL-2 and IL-8 levels dropped significantly in the azithromycin group. There was a significant reduction in the incidence of death and O<sub>2</sub> dependency at 28 days/death in azithromycin-treated patients regardless of the detection of Ureaplasma in blood. Conclusions: Azithromycin has anti-inflammatory effects, with a decrease in cytokines after 5 days of use and a reduction in death and O<sub>2</sub> dependency at 28 days/death in mechanically ventilated preterm neonates.