Dr. John Pemberton, who invented the original formulation of the black syrupy soft drink in 1886, had been badly injured in the battle of Columbus. After this, he became hopelessly addicted to prescription morphine, according to Jeremy Agnew in his book Alcohol and Opium in the Old West.
Being a trained pharmacist, Pemberton decided to come up with his own addiction cure. This resulted in "Pemberton’s French Wine Coca" — a dink that contained alcohol and cocoa leaf extract — the same ingredient that makes cocaine.
When Coca-Cola was first launched, it was marketed as a nerve tonic that "relieves exhaustion." Cocaine was removed from the product in 1903.