Secondary bacterial infections, including ventilator-associated pneumonia (VAP), lead to worse clinical outcomes and increased mortality following viral respiratory infections including in patients with coronavirus disease 2019 (COVID-19). Using a combination of tracheal aspirate bulk and single-cell RNA sequencing (scRNA-seq) we assessed lower respiratory tract immune responses and microbiome dynamics in 28 COVID-19 patients, 15 of whom developed VAP, and eight critically ill uninfected controls. Two days before VAP onset we observed a transcriptional signature of bacterial infection. Two weeks prior to VAP onset, following intubation, we observed a striking impairment in immune signaling in COVID-19 patients who developed VAP. Longitudinal metatranscriptomic analysis revealed disruption of lung microbiome community composition in patients with VAP, providing a connection between dysregulated immune signaling and outgrowth of opportunistic pathogens. These findings suggest that COVID-19 patients who develop VAP have impaired antibacterial immune defense detectable weeks before secondary infection onset.