The Daifang Commandery was an administrative division established by the Chinese Han dynasty on the Korean Peninsula between 204 and 220. It was conquered by Goguryeo in 314.
Gongsun Kang, a warlord in Liaodong, separated the southern half from the Lelang commandery and established the Daifang commandery sometime between 204 and 220 to make administration more efficient. He controlled southern natives with Daifang instead of Lelang.
In 238 under the order of Emperor Ming of Cao Wei, Sima Yi defeated the Gongsun family and annexed Liaodong, Lelang and Daifang to Wei. A dispute over the control of southern natives caused their revolt. The armies of Lelang and Daifang eventually stifled it.
Daifang Commandery was inherited by the Jin dynasty. Due to the bitter civil War of the Eight Princes, Jin became unable to control the Korean peninsula at the beginning of the 4th century. Zhang Tong (張統) broke away from Jin in Lelang and Daifang. After Luoyang, the capital of Jin, was occupied by the Xiongnu in 311, he went for help to Murong Hui, a Xianbei warlord, with his subjects in 314. Goguryeo under King Micheon annexed Lelang and Daifang soon after that.
The Daifang Commandery was located around Hwanghae and its capital was Daifang County. However, the controversy over its location is not resolved yet. According to a Chinese official chronicle, the Book of Jin (晉書), it had the following seven counties (縣, xian):