Shan donned a squarish helmet, with a black feather at the tip, along with a set of black-coloured armour. he carried a bow and arrows with him, rode on a black steed, and carried a black-coloured spear. Shan was extremely skillful in flooding his enemies during battle, thus he was nicknamed 'General of sacred water' (圣水将).
Cai Jing recommended Shan Tinggui and Wei Ding-guo to subdue the Liangshan rebels, and the emperor agreed to the suggestion. When Song Jiang received news of the attack on Liangshan, Guan Sheng immediately volunteered to fight the invaders. At Lingzhou, Hao Si-wen and Xuan Zan, Guan Sheng's aides, were both lured into the enemy formation and captured by Shan Tinggui and Wei Dingguo respectively. Hao Si-wen and Xuan Zan were escorted by guards as captives, but along the way, Bao Xu and Li Kui ambushed the guards and rescued both men.
Guan Sheng attacked Lingzhou once again, and Shan Ting-gui rode out to face him. Guan Sheng feigned defeat and lured Shan Tinggui to follow him. Then, Guan suddenly turned around and knocked Shan off his horse with the back of his halberd. Shan was then caught, but Song Jiang treated Shan with respect, which touched Shan and Shan agreed to join the Liangshan band. Later, Shan Ting-gui managed to persuade Wei Ding-guo to surrender and join Liangshan.
Both of them became leaders of the Liangshan cavalry as well as part of the 72 Earthly Fiends. Shan followed the heroes on their campaigns against the Liao Tartars and southern rebels, making great contributions. During the Fang La campaign, he followed Lu Junyi and successfully conquered Xuanzhou and Huzhou. Then, Shan Ting-gui and Wei Ding-guo attacked Wengzhou. Shan and Wei saw the gates wide open without any enemy soldiers in the city, so they rushed into the city, trying to gain the top credit. Not knowing it was a trap, they fell into a pit and were killed by enemy troops.