An ancient mythological tale from the Shiva Purana explains the origin of the first disease. The tale goes like-
In Tretayuga, the devils were all around disturbing the peace of the planet. Daksh Prajapati had the divine powers of slaying the demons and reestablishing peace. Instead of doing what he was required to do to finish off the demons, he conducted a huge Yagna and invited everyone.
While inviting the guests, he deliberately steered clear off his daughter, Goddess Sati and her husband Lord Shiva (the God of Destruction or Transformation). Upon being reminded of them, he did not budge from his determination to avoid them.
Lord Shiva came to know about the moral misconduct by Daksh Prajapati when he gained consciousness from his rumination and decided to slay the demons by himself. Meanwhile, Goddess Sati decided to pay a visit to her father during his Yagna and self-immolated herself in fire after hearing the offences against her husband.
Lord Shiva was already furious by the misconduct of Daksh Prajapati, his fury was further aggravated upon knowing the demise of His wife, Goddess Sati. Lord Shiva presented his outrage by presenting a kid Veerbhadra, who instantly demolished the Yagna.
The wrath of Lord Shiva was so fierce that everybody around suffered due to it. All the creatures were sweltering. The demigods got so afraid of the wrath that they started chanting the Lord’s name and offered praises to Him, till the time he reverted to his peaceful self. Lord Shiva, then directed Veerbhadra to reside in earthly creatures as Jwara (~fever) during the time of birth, death and the times of misconduct of lifestyle.
This is how the people of Earth fell ill for the first time. After being harmed by the menacing disease, the people continued to lead the life of neglect. Thus, began a series of diseases namely, Raktapitta, Gulma, Prameha, Kushtha, shosha, unmada, apasmara and many more.