Chloroquine (closely related to the naturally-occurring Quinine which has been used for centuries to treat and prevent malaria) was discovered in 1934 by Hans Andersag. and is on the World Health Organization's List of Essential Medicines.
Chloroquine was, until recently, the most widely used anti-malarial. It was the original prototype from which most methods of treatment are derived. It is also the least expensive, best tested and safest of all available drugs. The emergence of drug-resistant parasitic strains is rapidly decreasing its effectiveness; however, it is still the first-line drug of choice in most sub-Saharan African countries.[…]
Chloroquine is a 4-aminoquinolone compound with a complicated and still unclear mechanism of action. It is believed to reach high concentrations in the vacuoles of the parasite, which, due to its alkaline nature, raises the internal pH. Source: Wikipedia
The drug has also been used to treat, and the SARS-CoV-2 virus (COVID 19). In these cases, the mechanism of action is also unknown, - and, in the case of COVID, its effectiveness is disputed.