In his younger days, he was arrested and sentenced to death for providing shelter to fugitives, but he managed to break out of prison, disguise himself to fool the guards and successfully escape.
In the early 190s, he gathered a group of followers and brought them along to join Liu Biao, the Governor of Jing Province.
Around the time, he encountered Wang Zhong, who had fled to Jing Province to avoid a famine in the Guanzhong region.
When Lou Gui tried to recruit Wang Zhong to join Liu Biao, Wang Zhong attacked him, induced his followers to defect to his side, and brought them along to join the warlord Cao Cao.
In the novel, he is a hermit from Jingzhao Commandery (京兆郡; around present-day Xi'an, Shaanxi) living in the Zhongnan Mountains.