Bhairav who was created by lord Shiva from his third eye, had severed one of the five heads of
Lord Brahma on the instruction of lord Shiva. Now Brahma was left with only four heads.
Carrying the skull of Brahma in his hand, Bhairava started wandering in all the three worlds. To atone his sin of severing the head of lord Brahma, he was begging alms.
Bhairav reached Vishnuloka where he was welcomed warm heartedly by lord Vishnu and Lakshmi. Goddess Lakshmi dropped the learning (Vidya) named Manorath (by which all the wishes could be fulfilled) in the begging bowl (Skull) of Bhariav. Bhairav became extremely happy by this gift. Lord Shiva had created a oegrass named ‘Brahmahatya’ and had instructed Bhairav to reach Kashi, before her. According to lord Shiva this way the sin committed by Bhairav could successfully atoned.
After being blessed by goddess Lakshmi, Bhairav took the permission of Lord Vishnu and proceeded towards Kashi. After his departure asked Brahmahatya to stop chasing Bhairav. But she refused saying that she was just following the instruction of Lord Shiva.
When Bhairav reached Kashi, Brahmahatya too came near the outskirts of the city, but could not enter it because of Lord Shiva’s power instead she entered in to the netherworld (Patal loka). As soon as Bhairav had entered Kashi. The begging-bowl (skull) fell on the ground and thus Bhairav got liberated from his sins. Bhairav was extremely relieved. The place where the skull of Brahma had fallen, later on became as Kapal mochan- the most sacred place of pilgrimage.