The Akash Bhairab is said to be the Kirati king Yalambar himself. Legend has it that, Yalambar was the first king to establish this nation and even extended towards Tista in east and Trishuli in the west. He is believed to have gained the powers through tantric worshipping. During the famous battle of the Mahabharat, the first king of Kirat dynasty, Yalambar in disguise of Bhairab, went to the battlefield to help the losing party.
When Lord Krishna heard of it, he tried to test the ability of Bhairab, turned out that if Bhairab was to be allowed to join the losing side, the war would continue till both parties were to be annihilated, for whichever side Bhairab will have overwhelming advantage that the arrow, Bhairab (Yalamber is kirat king, and kirats are known to be great hunters whose primary weapon is bow and arrow) possessed could even penetrate the body of Krishna who is considered divinity.
So Krishna asked Bhairab if Bhairab could give something as gift, for Bhairav is/was the greatest of all warrior in the gathering of Mahabharata, as Bhairav agreed, Krishna asked or the head of Bhairab and he promptly chopped Yalambar's head, which reached Kathmandu through the sky, hence the name given to the sky god or the Akash Bhairab.
Aakash Bhairav has often been depicted in Buddhist iconography by a large blue head with a fierce face, huge silver eyes and a crown of skulls and serpents. The deity head resides on a silver throne that is carried by lions, accompanied by Bhimsen (Bhima) and Bhadrakali on either side. The idol face is understood to represent the mask that King Yalamber wore on his way to the Kurukshetra. The Indrachok idol is somewhat milder in demeanor than many of the Buddhist idols.
Lord Aakash Bhairav, the 'god of the sky', is also regarded by Nepalese as a progenitor of the Maharjan caste, especially the peasant groups. Pictured on Aakash Bhairav's head is an image that the Buddhists identify as Buddha, and the Hindus identify as Brahma, thus making the idol of Yalamber/Barbarika/Aakash Bhairav worshipped by all.