Zhu Yuanzhang's mooncake uprising
The tradition of eating mooncakes on the festival is believed to be linked to Zhu Yuanzhang, founder of the Ming Dynasty (1368-1644).
In the late Yuan Dynasty (1271-1368), people were tortured by the cruel government, which prompted a nationwide rebellion. Zhu Yuanzhang was a rebel leader.
Zhu sought to launch an uprising on the night of Mid-Autumn Festival but it was difficult to get his orders to his supporters, as raids by government forces were intense.
Zhu's troops came up with the idea of hiding notes containing the date of the revolt in mooncakes and distributing them to resistance forces. The ploy worked and the rebels successfully took the capital of the Yuan Dynasty—today's Beijing - and so began the Ming Dynasty.
In celebration, Emperor Zhu ordered the mooncakes used be given to soldiers and the people.
From that grew the custom of consuming mooncakes to celebrate Mid-Autumn Festival.