The Shang Dynasty lasted from 1700-1027 BC in ancient China. It was ruled by 30 emperors over 17 generations and was known for developing early Chinese writing and advanced bronze metallurgy. The Shang Dynasty fell around 1027 BC when the last ruler, King Di Xin, was a corrupt and tyrannical leader who plunged the society into darkness through his excessive drinking and immoral behavior.