 The Mongol @-@ led Yuan dynasty ( 1271 – 1368 ) ruled before the establishment of the Ming dynasty . Explanations for the demise of the Yuan include institutionalized ethnic discrimination against Han Chinese that stirred resentment and rebellion , <unk> of areas hard @-@ hit by inflation , and massive flooding of the Yellow River as a result of the abandonment of irrigation projects . Consequently , agriculture and the economy were in shambles , and rebellion broke out among the hundreds of thousands of peasants called upon to work on repairing the dykes of the Yellow River . A number of Han Chinese groups revolted , including the Red Turbans in 1351 . The Red Turbans were affiliated with the White Lotus , a Buddhist secret society . Zhu Yuanzhang was a penniless peasant and Buddhist monk who joined the Red Turbans in 1352 ; he soon gained a reputation after marrying the foster daughter of a rebel commander . In 1356 , Zhu 's rebel force captured the city of Nanjing , which he would later establish as the capital of the Ming dynasty . 
