When Köke Temür lost battles against Ming General Xu Da and the Ming troops approached Hebei, Toghon Temür gave up Khanbalik and fled to the summer base Xanadu.
In legend, an illness made Xu allergic to goose and the Hongwu Emperor sent him goose to eat, ensuring that Xu ate it and died.