In 221 BC, the Qin state conquered the other six major states and unified China under the rule of the Qin dynasty. After Qin Shi Huang, the first Qin emperor, died in 210 BC, an uprising broke out in 209 BC and lasted about five months before Qin forces defeated the rebels.