The method of inoculation believed to have been discovered sometime before AD 1000 in India (Henderson and Moss 1999). The idea of inoculation was derived from both Agada-tantra, one of the eight branches of traditional Ayurveda (Indian Medicine).
From India, the practice spread to China, western Asia, and Africa and finally, in the early eighteenth century, to Europe and North America.
The best source concerning the Indian method of treatment of smallpox is a report by Dr. John Z. Holwell in 1767 for the College of Physicians in London. Here is an article written by Prof Subhash Kak.
How Ayurveda Pioneered Smallpox Inoculation (swarajyamag.com)