Hailing from the lands of Yu Province, Xiahou Ba was born to Xiahou Yuan, an excellent bowman in the service of his cousin Cao Cao. Xiahou Ba's first battle was in 219 AD at the Battle of Mt. Dingjun, where he witnessed his father's death at the hands of Shu general Huang Zhong. Xiahou Ba was fostered under Guo Huai, a fellow Wei general, and he taught him the skills of generalship. Xiahou Ba fought against Zhuge Liang in his Northern Expeditions, and was nearly killed when he fell into a trap by Wang Ping's crossbowmen in the Battle of Wu Zhang Plains in 234 AD. His last battle fought for Cao Wei was during Gongsun Yuan's uprising in 238 AD.
After Cao Shuang's execution by Sima Yi in 249 AD, Xiahou Ba sensed that his family was at risk and escaped to Shu, who had killed his father exactly thirty years earlier at Dingjunshan. Xiahou Ba's talent was recognized by strategist Jiang Wei, who took him under his wing during the Battle of Mt. Tietong in 253 AD. Jiang Wei saved his life from Guo Huai, who was impaled by two arrows by Shu archers. Xiahou Ba was carried back to the rear of the lines by Jiang Wei, who refused to let a skilled general die. He participated in many other northern expeditions led by Jiang Wei, his last one at the Battle of Taoyang in 262 AD. During this battle, he was caught in a trap while escaping the castle and impaled by many arrows.