The COVID-19 pandemic caused by SARS-CoV-2 has been socially and economically devastating. Despite an unprecedented research effort and available vaccines, effective therapeutics are still missing to limit severe disease and mortality. Using high-throughput screening, we identify acriflavine (ACF) as a potent papain-like protease (PLpro) inhibitor. NMR titrations and a co-crystal structure confirm that acriflavine blocks the PLpro catalytic pocket in an unexpected binding mode. We show that the drug inhibits viral replication at nanomolar concentration in cellular models, in vivo in mice and ex vivo in human airway epithelia, with broad range activity against SARS-CoV-2 and other betacoronaviruses. Considering that acriflavine is an inexpensive drug approved in some countries, it may be immediately tested in clinical trials and play an important role during the current pandemic and future outbreaks.