Ancient China's first government was formed by the Xia dynasty, which is considered to be the first of China's great dynasties. The Ancient Chinese period lasted from 2100 BC to 221 BC, during which the first of the Qin dynasty emperors took charge and ushered in the Imperial era.
Prior to the Xia dynasty, Chinese villages were ruled by chieftains, who were often large men. The Xia dynasty was the first to create a centralized government, however, not much is known about their rule due to limited archaeological evidence.
The Shang dynasty existed from 1600 BC to 1046 BC, and is believed by most to have succeeded the Xia dynasty, though there are some scholars who believe they existed simultaneously. The dynasty consisted of 31 different kings, thus forcing the Shang dynasty's capital city to move six times.
The Zhou dynasty lasted from 1046 BC to 256 BC and was the longest lasting dynasty in Chinese history. It is believed that the Zhou began their rule under a semi-feudal system. The rulers of the Zhou were the first to legitimize their rule using the Mandate of Heaven, which would become a customary practice for many other Chinese rulers. Power under the Zhou would eventually become decentralized as local leaders gained more political power and were subservant to the Zhou in name only. The Zhou were eventually defeated by the Qin, reuniting China and centralizing political power once more.