Wang Gong 王恭 (350-398), courtesy name Xiaobo 孝伯, was a high minister of the late Eastern Jin period 東晉 (317-420). He hailed from Jinyang 晉陽 in the commandery of Taiyuan 太原 (today's Shanxi province).
He began his career as an assistant editorial director (zuo zhuzuo lang 佐著作郎) but resigned due to illness. Shortly thereafter, he was appointed Assistant Director of the Palace Library (mishu cheng 秘書丞) and was subsequently promoted to Gentleman of the Palace Secretariat (zhongshu lang 中書郎). He left office to observe mourning for his father. After the mourning period ended, he was appointed Department Director of the Ministry of Personnel (libu lang 吏部郎) and later held the position of General Who Establishes Might (jianwei jiangjun 建威將軍).
Emperor Xiaowu 晉孝武帝 (r. 372-396), holding him in high regard due to his status as the elder brother of the Empress, appointed him as metropolitan magistrate (yin 尹) of Danyang 丹陽. In 388, he was promoted to Director of the Palace Secretariat (zhongshu ling 中書令) and concurrently served as Supervisor of the Household of the Heir Apparent (taizi zhanshi 太子詹事).
In 390, he was appointed Area Commander-in-Chief (dudu 都督) of military affairs in the provinces of Qingzhou 青州, Yanzhou 兗州, Youzhou 幽州, Bingzhou 並州, and Jizhou 冀州, General of the Front (qian jiangjun 前將軍), and regional inspector (cishi 刺史) of Qingzhou and Yanzhou, stationed at Jingkou 京口 (today's Zhenjiang 鎮江, Jiangsu).
When the army of the Later Yan empire attacked the province of Qingzhou, he sent a detachment to resist them, but it was defeated. Consequently, his rank was lowered to General Who Assists the State (fuguo jiangjun 輔國將軍).
After Emperor Xiaowu died, Sima Daozi 司馬道子 (364-403) assumed power and heavily favoured Wang Guobao 王國寶, entrusting him with significant authority. Wang Gong then plotted to eliminate Wang Guobao in order to cleanse the emperor's inner circle. Under this pressure, Sima Daozi was compelled to have Wang Guobao executed.
In 398, in opposition to the central government's attempts to weaken the power of regional inspectors, Wang Gong raised troops once more under the pretext of punishing Wang Yu 王愉 (d. 404) and Sima Shangzhi 司馬尚之 (d. 402). However, one of his generals, Liu Laozhi 劉牢之 (d. 402), defected to the central government and sent troops against Wang Gong. Wang Gong fled to Changdang Lake 長塘湖 in Qu'a 曲阿 (between present-day Liyang 溧陽 and Jintan 金壇 in southern Jiangsu). He was captured by the lake warden and sent to the capital, where he was executed.
When Huan Xuan 桓玄 (369-404) came to power, he submitted a memorial to rehabilitate Wang Gong. Wang Gong was posthumously the title of Palace Attendant (shizhong 侍中) and Grand Guardian (taibao 太保), with the posthumous name Zhongjian 忠簡公.