The name Zhili means "directly ruled" and indicates regions directly ruled by the imperial government of China. Zhili province was first constituted during the Ming Dynasty when the capital of China was located at Nanjing along the Yangtze River. In 1403, the Ming Yongle Emperor relocated the capital to Beiping, which was subsequently renamed Beijing. The region known as North Zhili was composed of parts of the modern provinces of Hebei, Henan, Shandong, including the provincial-level municipalities of Beijing and Tianjin. There was another region located around the "reserve capital" Nanjing known as South Zhili that included parts of what are today the provinces of Jiangsu and Anhui, including the provincial-level municipality of Shanghai.
During the Qing Dynasty, Nanjing lost its status of the "second capital" and Southern Zhili was reconstituted as a regular province, Jiangnan, while Northern Zhili was renamed Zhili Province. In the 18th century the borders of Zhili province were redrawn and spread over what is today Beijing, Tianjin and the provinces of Hebei, Western Liaoning, Northern Henan, and the Inner Mongolia Autonomous Region. In 1928 the government of the Republic of China assigned portions of northern Zhili province to its neighbors in the north and renamed the remainder Hebei Province.