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 we assessed lower respiratory tract immune responses and microbiome dynamics in 23 COVID-19 patients, 10 of whom developed VAP, and eight critically ill uninfected controls. At a median of three days (range: 2-4 days) before VAP onset we observed a transcriptional signature of bacterial infection. At a median of 15 days prior to VAP onset (range: 8-38 days), 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.