Background: There is mounting evidence suggesting that the microbiome composition could be different in COVID-19 patients. However, the relationship between microbiota and COVID-19 severity progression is still being assessed. This study aimed to analyse the diversity and taxonomic composition of the nasopharyngeal microbiota, to determine its association with COVID-19 clinical outcome. Methods and Findings: Samples came from a retrospective cohort of adult patients with COVID-19, hospitalised in a tertiary centre. To study the nasopharyngeal microbiota, we utilized 16S rRNA sequencing. Raw sequences were processed by QIIME2. The associations between the microbiota, invasive mechanical ventilation (IMV), and all-cause mortality were analysed by multiple logistic regression (OR; 95%CI), adjusted for age, gender, and comorbidity. 177 patients were included: median age 68.0 years, 57.6% males, 59.3% had a Charlson comorbidity index ≥3, and 89.2% with pneumonia. The microbiota α diversity indexes were lower in patients with a fatal outcome, and this association persisted after adjustment for the main confounders; whereas the β diversity analysis showed a significant clustering, grouping the patients with a fatal outcome. After multivariate adjustment, the presence of Selenomonas spp., Filifactor spp., Actinobacillus spp., or Chroococcidiopsis spp., was associated with a reduced risk of IMV (adjusted OR 0.06[95%CI 0.01–0.047], p = 0.007). Conclusions: The microbiota diversity and taxonomic composition are related to COVID-19 severity. Higher diversity and the presence of certain genera in the nasopharyngeal microbiota seem to be early biomarkers of a favourable clinical evolution in hospitalised patients with moderate to severe SARS-CoV-2 infections.