https://en.wikipedia.org/wiki/Ivermectin#cite_note-13
Looks like it was first noted in mice, and expanded to livestock species
The avermectin family of compounds was discovered by Satoshi Ōmura of Kitasato University and William Campbell of Merck. In 1970, Ōmura isolated unusual Streptomyces bacteria from the soil near a golf course along the south east coast of Honshu, Japan.[7] Ōmura sent the bacteria to William Campbell, who showed that the bacterial culture could cure mice infected with the roundworm Heligmosomoides polygyrus.[7] Campbell isolated the active compounds from the bacterial culture, naming them "avermectins" and the bacterium Streptomyces avermitilis for the compounds' ability to clear mice of worms (in Latin: a 'without', vermis 'worms').[7] Of the various avermectins, Campbell's group found the compound "avermectin B1" to be the most potent when taken orally.[7] They synthesized modified forms of avermectin B1 to improve its pharmaceutical properties, eventually choosing a mixture of at least 80% 22,23-dihydroavermectin B1a and up to 20% 22,23-dihydroavermectin B1b, a combination they called "ivermectin".[7][62]
Ivermectin was introduced in 1981.[63] Half of the 2015 Nobel Prize in Physiology or Medicine was awarded jointly to Campbell and Ōmura for discovering avermectin, "the derivatives of which have radically lowered the incidence of river blindness and lymphatic filariasis, as well as showing efficacy against an expanding number of other parasitic diseases".[14]
By 1986, ivermectin was registered for use in 46 countries and was administered massively to cattle, sheep and other animals.[64] Ivermectin was approved for human use in 1988.[65] Ivermectin earned the title of "wonder drug" for the treatment of nematodes and arthropod parasites.[66] Ivermectin has been used safely by hundreds of millions of people to treat river blindness and lymphatic filariasis.[67]