The great epic of Mahabharata has many interesting legends which are associated with many Indian festivals. One such interesting legend is associated with the rakhi festival. This legend is related with the eldest of five Pandava brothers, king Yudhisthir and lord Krishna.
During the great battle of Mahabharata in Kurukshetra (battle ground), Yudhisthir asked lord Krishna for some divine protection so that he could guard himself against all evils and disasters in the ensuing battle.
King Yudhisthir was thus advised by lord Krishna to observe the ceremony of the Raksha Bandhan by tying the sacred thread (Rakhi) around his wrist. This thread was supposed to protect him from evils and impending dangers not only during the battle but also post battle, for the rest of his life.