The legend of Yudhisthir traces the origin of Raksha Bandhan back to the Mahabharata days. Yudhistir legend is an important part of the Rakhi history, origin and story.
Rakhi Festival : Rakhi Legends : Legend of Yudhisthir
Legend of Yudhisthir
Another interesting legend associated with Rakhi comes from the great
epic, the Mahabharata. This legend revolves around lord Krishna and
Yudhisthir, the eldest of the Pandava brothers (during the Mahabharata
battle). During this battle, Yudhisthir asked lord Krishna for some
divine protection so that he could guard himself against all evils and
disasters in the ensuing battle. Yudhisthir was 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.