Donghai Commandery was established in the Qin dynasty, possibly under the name Tan Commandery (郯郡). In early Western Han, it became part of Liu Jiao's Chu Kingdom. After the abortive Rebellion of the Seven States, Donghai was carved out from Chu. Later, the commandery's borders gradually expanded as marquessates split from nearby kingdoms were added to the commandery. In late Western Han, it administered a total of 38 counties and marquessates: Tan (郯), Lanling (蘭陵), Xiangben (襄賁), Xiapi (下邳), Liangcheng (良成), Pingqu (平曲), Qi (戚), Qu (朐), Kaiyang (開陽), Fei (費), Licheng (利成), Haiqu (海曲), Lanqi (蘭祺), Zeng (繒), Nancheng (南成), Shanxiang (山鄉), Jianxiang (建鄉), Jiqiu (即丘), Zhuqiu (祝其), Linyi (臨沂), Houqiu (厚丘), Rongqiu (容丘), Dong'an (東安), Hexiang (合鄉), Cheng (承), Jianyang (建陽), Quyang (曲陽), Siwu (司吾), Yuxiang (于鄉), Pingqu (平曲), Duyang (都陽), Yinping (陰平), Wuxiang (郚鄉), Wuyang (武陽), Xinyang (新陽), Jianling (建陵), Changlü (昌慮), Duping (都平). The population was 358,414 households, or 1,559,357 individuals.
A number of counties and marquessates were merged in early Eastern Han. The commandery constituted part of the Lu Kingdom during the reigns of Emperor Guangwu and Emperor Ming, until Liu Qiang (劉彊), the prince of Donghai, offered the territory back to the imperial government. In 72 AD, several counties were separated to created the new Xiapi Commandery (下邳郡). In 140, there were 13 counties, namely Tan, Lanling, Qi, Qu, Xiangben, Changlü, Cheng, Yinping, Licheng, Hexiang, Zhuqi, Houqiu, and Ganyu (赣榆). The population was 148,784 households, or 706,416 individuals.
During Cao Wei dynasty, Donghai served as the fief of Cao Lin, a son of the Emperor Wen, and his son Cao Qi (曹啟). By the reunification of Jin dynasty in 280, 11,100 households remained in the commandery. In 291, a new commandery, Lanling, was established. Donghai subsequently became the fief of the prince and regent Sima Yue. After the Disaster of Yongjia, the region fell to Later Zhao.
Emperor Ming of Qi reestablished Donghai Commandery at Xiangben. In 549 during Eastern Wei, a commandery centered in Ganyu was renamed Donghai, while the former commandery was renamed to Haixi (海西). Meanwhile, the former seat of Han and Jin era Donghai, Tan, was part of a new Tan Commandery. They were abolished in early Sui dynasty.
In Sui and Tang dynasties, Donghai Commandery became an alternative name of Hai Prefecture. In 742, it administered 4 counties: Qushan (朐山), Donghai (東海), Shuyang (沭陽) and Huairen (懷仁). The population was 28,549 households, or 184,009 individuals.</ref>