Once there was a Brahmin who worshipped Shiva. Dushan, a
demon, had become powerful because of a boon granted by Brahma. He
started disturbing the Brahmin during his meditation. Shiva appeared and
burnt Dushan. After this, Shiva was given the name Mahakaal and a
Jyotirlinga (shrine where Shiva is worshipped) called Mahakaaleshwar was
set up in Ujjain.