The episode references the long-standing belief in Japanese folklore that Minamoto no Yoshitsune, one of the top leaders of the Gempei War (1140s-1185) escaped his jealous bother Minamoto no Yoritimo, who had become the first Shogun, by fleeing to Mongolia. There, the legend says, he took control of the Mongol hordes under the name Genghis Khan.
The ending is based on Chapter 103 of the manga.