Yan Shigu (Chinese: 顏師古; Wade–Giles: Yen Shih-ku) (581–645), formal name Yan Zhou (顏籀), but went by the courtesy name of Shigu, was a famous Chinese historian, linguist, politician, and writer of the Tang dynasty.
Recommended by Li Gang (李綱), he was given a post at Anyang county (now Xiangyang, Hubei) during the reign of Emperor Wen of Sui.
One of his father's old friends, Xue Daoheng (薛道衡), was impressed by Yan's talent, and often asked for his comments on his new works.
Yan was promoted when Li Shimin ascended the throne, but resumed his duty after his mother's funeral.
After years of struggle, Yan was then demoted, but was subsequently ordered to revise the Five Classics in the imperial library.