The candidate had to be trained as a scholar and then pass a series of written examinations. The Chinese civil service system, established in 124 B.C.E., required potential officials to be trained as scholars and then pass rigorous examinations to qualify for office.
What happened after the collapse of the Ming Dynasty were:
1) there were natural disasters, war and rebellions.
2) earthquakes.
3) war against the Japanese.
4) unusually dry and cold weather.
5) plague
6) misrule
7) money crisis
8) rebellion from Li Zicheng's troops.