Gong Lu was from Anhan County (安漢縣), Baxi Commandery (巴西郡), which is present-day Nanchong, Sichuan.[3] His father, Gong Chen (龔諶), served as an Officer of Merit (功曹) in Baxi Commandery. Between 211 and 214,[4] the warlord Liu Bei attacked Yi Province (covering present-day Sichuan and Chongqing) in his bid to seize control of the province from Liu Zhang, the Governor of Yi Province. During this time, Gong Chen surrendered to Zhang Fei, a general under Liu Bei, and assisted Zhang Fei in capturing Baxi Commandery for Liu Bei.[5][6]
In 214,[7] after Liu Bei successfully took over Yi Province and became the new Governor, he appointed Gong Lu's father, Gong Chen, as the Administrator (太守) of Qianwei Commandery (犍為郡; around present-day Meishan, Sichuan).[8] At the same time, he also appointed Gong Lu as an Assistant Officer (從事) and Officer of the Standard (牙門將) in Ba Commandery.[9][6]
When he was transferred to Ba Commandery, Gong Lu along with another scholar Yao Zhou were famous and popular with high rank and salary yet they admired Zhang Ni whose status was lower than them due to his accomplishments and became friends with him.[10]