The origins of homeopathy are perhaps understandable. In the 18th Century medicine relied on basic methods such as bloodletting and complex concoctions. The treatment was as likely to make you worse or kill you, as it was to do anything else. Medicine at the time was clearly pre-scientific with the key aspect being the idea of balancing the four humors of the body, phlegm, blood, black bile, and yellow bile. Samuel Hahnemann, who rejected giving people bizarre brews, he proposed giving people a single substance with low doses.
Noble sounding stuff. Unfortunately, that's as good as it got. Whilst translating a treatise of William Cullen's into German he duly applied a useful tool - skepticism. He doubted the idea that Cinchona bark could be used to treat malaria. Cinchona bark contains quinine which is an antimalarial, but not for any reason that gives any credence to homeopathy, and it is no longer used as a primary treatment.
Hahnemann ate some of the bark and suffered fever, shivering, and joint pain. He had given himself cinchonism due to an overdose of quinine, and thinking that these symptoms were similar to malaria decided that an effective treatment causes symptoms similar to the element it is to treat. This one experience was the entire basis of Hahnemann's Law of Similars which isn't a law of nature at all. Drawing conclusions like that based on one experience is phenomenally bad reasoning and not scientific. Hahnemann believed that to avoid aggravating the symptoms of illness extreme dilutions of the ingredients were necessary, and so he pulled a second law out of thin air. His Law of Infinitesimals and homeopathy as we know it was born.
In his book The Organon of the Healing Art he claimed that the dilution process enhanced the spirit-like medicinal powers of the crude substances. Hahnemann replaced the four humors being treated by medicine of the time with the body's vital force which is really just replacing one misguided notion with another one plucked from nowhere. He also introduced the concept of miasms as agents of disease not to be confused with the miasma idea which was overturned in the 19th Century with the discovery of germs and with the Germ Theory of disease. Creationists might like to note at this point that Germ Theory is still only theory.
Hahnemann died in 1843 and so predated the main breakthroughs that led to Germ Theory. As such, he always rejected the notion that illness was caused by anything external. Clearly based on progress made shortly after his death, and since, we know that pathogenic illnesses aren't caused by problems with some vital force woo woo.