Onion has been historically valued for its various health promoting activities. It has been traditionally used to treat various infectious diseases and alleviate the symptoms of several respiratory ailments. However, the therapeutic potential of the plant against respiratory viruses remains meager. This study aimed to investigate the metabolic profiles of bulb extracts of four onion cultivars (red, copper-yellow, golden yellow and white onions) using UPLC-MS/MS combined to chemometrics. Further, the extracts were assessed for their potential anti-COVID-19 activity against the omicron sub-variant BA.5 of SARS-CoV-2. A total of 81 metabolites of diverse chemical classes were identified including amino acids and peptides, flavonoids, phenolic acids, saponins and fatty acids. The four cultivars displayed significant variations in their chemical composition, with copper-yellow onion exhibiting the richest metabolic profile which distinguished it from the others. Except for white onion, the tested cultivars displayed promising anti-COVID-19 activities (IC50 9.78–16.39 μg/mL) and effectively downregulated viral RNA dependent RNA polymerase (RdRp) and envelope (E) genes. Multivariate analysis revealed potential anti-COVID-19 bioactive metabolites. Among them, chlorogenic, caffeic acids, and kaempferol effectively inhibited viral RdRp and E genes in vitro, with a % downregulation of (86 %, 79 %), (80 %, 73 %), and (82 %, 70 %), respectively, at 30 μg/mL. The results from in vitro testing were corroborated by molecular docking and dynamics studies as the compounds showed significant interactions with the viral target proteins forming stable protein-ligand complexes. This study increments the value of metabolomics as a promising tool for cultivar differentiation. Conjointly, it lays the groundwork for future research into the anti-COVID-19 potential of onion as a valuable source of bioactive compounds.