The COVID-19 pandemic is a stark reminder that a barren global antiviral pipeline has grave humanitarian consequences. Future pandemics could be prevented by accessible, easily deployable broad-spectrum oral antivirals and open knowledge bases that derisk and accelerate novel antiviral discovery and development. Here, we report the results of the COVID Moonshot, a fully open-science structure-enabled drug discovery campaign targeting the SARS-CoV-2 main protease. We discovered a novel chemical scaffold that is differentiated to current clinical candidates in terms of toxicity and pharmacokinetics liabilities, and developed it into orally-bioavailable inhibitors with clinical potential. Our approach leverages crowdsourcing, high throughput structural biology, machine learning, and exascale molecular simulations. In the process, we generated a detailed map of the structural plasticity of the main protease, extensive structure-activity relationships for multiple chemotypes, and a wealth of biochemical activity data. In a first for a structure-based drug discovery campaign, all compound designs (>18,000 designs), crystallographic data (>500 ligand-bound X-ray structures), assay data (>10,000 measurements), and synthesized molecules (>2,400 compounds) for this campaign were shared rapidly and openly, creating a rich open and IP-free knowledgebase for future anti-coronavirus drug discovery.