As a complement to vaccines, small-molecule therapeutic agents are needed to treat or prevent infections by severe acute respiratory syndrome coronavirus-2 (SARS-CoV-2) and its variants, which cause COVID-19. Affinity selection−mass spectrometry was used for the discovery of botanical ligands to the SARS-CoV-2 spike protein. Cannabinoid acids from hemp (Cannabis sativa) were found to be allosteric as well as orthosteric ligands with micromolar affinity for the spike protein. In follow-up virus neutralization assays, cannabigerolic acid and cannabidiolic acid prevented infection of human epithelial cells by a pseudovirus expressing the SARS-CoV-2 spike protein and prevented entry of live SARS-CoV-2 into cells. Importantly, cannabigerolic acid and cannabidiolic acid were equally effective against the SARS-CoV-2 alpha variant B.1.1.7 and the beta variant B.1.351. Orally bioavailable and with a long history of safe human use, these cannabinoids, isolated or in hemp extracts, have the potential to prevent as well as treat infection by SARS-CoV-2.