Ban Gu 班固 (32-92 CE), courtesy name Mengjian 孟堅, was an important historian of the early Later Han period 後漢 (25-220 CE). He is known as the main author of the official dynastic history of the Former Han period 前漢 (206 BCE-8 CE), the Hanshu 漢書, and as the compiler of the first part of the Dongguan hanji 東觀漢記.
Ban Gu hailed from Fufeng 扶風 (near modern Xianyang 咸陽, Shaanxi) and entered the National University (taixue 太學) in the capital Luoyang 洛陽 (modern Luoyang, Henan) in 47 CE, where he studied the vast corpus of literature available in the library there. He returned to his home town in 54 CE, when his father Ban Biao 班彪 died.
During the required three-year period of mourning, he studied his father's compilation of a continuation of the universal history Shiji 史記 that had ended during the reign of Emperor Wu 漢武帝 (r. 141-87 BCE). This draft, called Houzhuan "Later biographies", served as the basis upon which Ban Gu started compiling the Hanshu. The book was largely finished around 80 CE.
Ban Gu returned to official service and took part in the compilation of several official biographies and records, like Shizu benji 世祖本紀, the imperial biography of Emperor Guangwu 漢光武帝 (r. 25-57), the founder of the Later Han dynasty. Ban first held the office of a common courtier (lang) and was then promoted to commander of the guard of the Xuanwu Gate (xuanwu sima 玄武司馬).
Only when Emperor Zhang 漢章帝 (r. 75-88) mounted the throne, he perceived Ban Gu as a literatus of great abilities. The Emperor often called him to the court to receive Ban Gu's instructions. Out in the country, the historian often was allowed to accompany Emperor Zhang. Ban Gu submitted a lot of poems and rhapsodies to the emperor, and also court memorials that dealt with actual political matters like the conquest of the Western Territories.
Emperor Zhang was very interested in Confucian teaching and therefore in 79 CE convoked Confucian scholars in the White Tiger Hall 白虎觀 to discuss the Confucian Classics, especially the contradictions between the new-text and the old-text classics, and these with the apocryphal Classics.
Ban Gu, as a historian and scribe, participated in the conference and recorded the official version of the course and proceedings of the discussions. These were written down in the book Baihu tongyi 白虎通義.
In 89 CE Ban Gu was appointed army supervisor (zhonghujun 中護軍) in the staff of general Dou Xian 竇憲 and took part in the latter's campaign against the Northern Xiongnu 北匈奴. Dou Xian defeated the khan, climbed Mt. Yanran 燕然山 (modern Khangai Mountains in central Mongolia, Ch. Hang'ai 杭愛山), where he erected a stele reporting his victory. The inscription was composed by Ban Gu. During the months in the field, Ban Gu had not only become the secretary of Dou Xian, but also was a supporter of Dou Xian against his enemies at the court.
When Dou Xian lost his political fight and was forced to commit suicide in 92 CE, Ban Gu was arrested. He died in jail.