Wang Ping was adopted by the He clan and was known as "He Ping" until he decided to change his surname back to Wang. He originally served a colonel named Du Huo of Hanzhong, and in 217, he served Cao Cao's army when Du Huo aided him during the Battle of Hanzhong against Shu's army of Liu Bei. During the battle, many Wei troops deserted in search of food and shelter, and Wang Ping also joined Shu. This came after his commander Xu Huang crossed the Han River to fight the Shu against Wang's advice, as it would now be impossible to retreat, as the river would slow a withdrawal (Xu Huang told him that his troops would fight to the death). Wang Ping set Xu Huang's camp on fire at night after he found out that Xu Huang planned to kill him as a result of the predicted loss to Shu, and he defected to Liu Bei. As a reward, he was made Major-General, and he assisted in the submission of the Nanman people of southern China in 225.
During the Northern Expeditions of Zhuge Liang, he advised against Ma Su's decision to encamp on the top of Mt. Jie Ting instead of camping near water supplies, but Ma Su refused, sending Wang Ping with 1,000 troops to guard one of the passages to the mountain. Wang Ping sounded drums when Wei general Zhang He approached; the drums were to alarm a defense, but Zhang He took it as a surprise attack, and withdrew. After the 227 Battle of Jieting resulted in a Shu defeat, Wang Ping was promoted for gathering scattered supplies and for his bravery, while Ma Su was executed. In 231, Wang Ping was encumbered with more responsibilities, and he repulsed an attack on Lucheng by Zhang He again. In 234 he was made a governor under Wu Yi after putting down Wei Yan's rebellion, and he later replaced Wu Yi as Area Commander of Hanzhong.
In 244, Wei regent Cao Shuang and 100,000 Wei troops attacked Hanzhong, and Wang Ping was the commander of the Shu forces in the area. With 30,000 troops, Wang Ping was not intimidated by the large Wei army, and his army won the Battle of Mt. Xingshi by ambushing the Wei when they attacked his supply depot. Wang Ping died in 248.