He hailed from the region of Qi 齊 (modern Shandong) and was an expert in the Shijing "Book of Songs" in the local version of Qi, which belongs to the new-text (or modern script) versions of the Shijing. He was thus the founder of the Qi school of the Shijing (Qishixue 齊詩學).
During the reign of Emperor Jing 漢景帝 (r. 157-141 BCE) he became an erudite (boshi 博士). As a such he pledged for a more activist style of government than the politics of relaxation (wuwei 無為) that the emperors Wen 漢文帝 (r. 180-157 BCE) and Jing had followed. At the court he openly debated with the Daoist scholar Master Huang 黃生 about how the rulers of the past had obtained the right to rule, either by Heavenly Mandate (shouming 受命) or by force. He also dared to criticize the Daoist book Laozi 老子 towards the Empress Dowager Dou 竇太后, who was inclined to Daoist philosophy. The Empress Dowager became so enraged that she ordered Yuan Gu to fight with a wild boar, but Yuan Gu killed the animal with a knife that Emperor Jing had given him.
The latter's successor, Emperor Wu 漢武帝 (r. 141-87 BCE), highly estimated Yuan Gu as a competent person, but because of his old age, Yuan Gu did not want to assist the emperor in political affairs. The only support he gave was to admonish the Counsellor-in-chief (chengxiang 丞相) Gongsun Hong 公孫弘 to exert a government with the spirit of Confucius.
The expert in the Qi version of the Shijing compiled a lot of books and so transmitted his view of the Confucian world. The imperial bibliography Yiwen zhi 藝文志 in the official dynastic history Hanshu 漢書 lists the books Qi Houshi gu 齊后氏故, Qi Sunshi gu 齊孫氏故, Qi Houshu zhuan 齊后氏傳, Qi Sunshi zhuan 齊孫氏傳, and Qizaji 齊雜記. Unfortunately nothing has survived of these writings on the Qi tradition of the "Book of Songs", except a few fragments collected by the Qing-period 清 (1644-1911) scholar Ma Guohan 馬國翰 in his series Yuhan shanfang jiyi shu 玉函山房輯佚書 as the book Qishizhuan 齊詩傳.
There are some commentaries on these books, like Chen Shouqi's 陳壽祺 Qishi yishuo kao 齊詩遺說考 and Chen Qiaozong's 陳喬樅 Qishi yishi shuzheng 齊詩翼氏疏證 that are included in the collection Huang-Qing jingjie xubian 皇清經解續編.