Beihai Commandery was a historicalcommandery of China, located in present-day northern Shandong province. Beihai was created during Emperor Jing of Han's reign. According to Zhou Zhenhe, Beihai was likely established on six counties from Jiaoxi Kingdom, and gradually expanded its borders over the rest of Western Han as marquessates from neighboring kingdoms were added to the commandery. In late Western Han, it covered 26 counties and marquessates: Yingling, Jukui, Anqiu, Zhi, Chunyu, Yi, Pingshou, Ju, Duchang, Pingwang, Pingdi, Liuquan, Shouguang, Lewang, Rao, Zhen, Sangdu, Pingcheng, Mixiang, Yangshi, Ledu, Shixiang, Shangxiang, Xincheng, Chengxiang and Jiaoyang. The population in 2 AD was 593,159, or 127,000 households. In early Eastern Han, the neighboring commanderies Zichuan, Gaomi and Jiaodong were merged into Beihai. In 52, it became a kingdom, and was gifted to Liu Xing, who was the adopted son of Liu Zhong, a brother of the Emperor Guangwu, as his fief. His descendants held the kingdom until 206, when it was converted to a commandery again. The Book of Later Han recorded 7 kings of Beihai:
In 140 AD, the kingdom administered 18 counties and marquessates: Ju, Yingling, Pingshou, Duchang, Anqiu, Chunyu, Pingchang, Zhuxu, Dong'anping, Gaomi, Chang'an, Yi'an, Jiaodong, Jimo, Zhuangwu, Xiami and Ting. The population was 853,604, or 158,641 households. From Cao Wei to Jin dynasties, Beihai's territory was much reduced, as a number of new commanderies including Gaomi, Chengyang and Pingchang was created. In Liu Song dynasty, Beihai covered 6 counties and had a population of 35,995, in 3,968 households. During Emperor Ming of Song's reign, the region was conquered by Northern Wei along with the rest of Song territories north of Huai River. The commandery was abolished in early Sui dynasty. In Sui and Tang dynasties, Beihai Commandery became an alternative name of Qing Prefecture. In 741, there were 7 counties, namely Yidu, Linzi, Qiansheng, Shouguang, Linqu, Bochang and Beihai. The population was 402,704, in 73,148 households.