Shang Kexi (尚可喜; Shang Ko-hsi; August 25, 1604 – November 12, 1676) was a Han Chinese general of the Ming and Qing Dynasties. His family had migrated to Liaodong in 1576 and his father, Shang Xueli, served in the army guarding the northeast frontier. As his father did, Shang Kexi joined the army and guarded the frontier against the attack of the Jurchens. With the decay and fall of the Ming Emperors, Shang Kexi sought better fortune in the service of the Manchu Qing Dynasty and he was one of the most powerful generals that surrendered to the Qing. He fought for the Qing in Southern China and established his power in Guangdong where he ruled the territory as his own domain amassing wealth and possessing a trained army.
In 1673 a war between the Emperor and the powerful Han princes, Wu Sangui and Geng Jingzhong, started when they opposed the Emperor's plan of resettling them in Manchuria. Shang remained loyal to the Qing and took no part in the rebellion. Shang died in 1676 and was succeeded by his son Shang Zhixin who rebelled shortly after but was defeated by the Manchus in 1677.