Yuwen Hu was born in 513 as a son of Yuwen Hao (宇文顥), a son of the local peasant leader Yuwen Gong (宇文肱) at Wuchuan (武川, in modern Hohhot, Inner Mongolia). His mother was Lady Yan, who was probably Yuwen Hao's wife. He was said to be particularly bright as a child and was favored by Yuwen Gong. In 524, with Northern Wei's northern provinces engulfed in peasant rebellions, Yuwen Gong and his sons, along with another local leader, Heba Duba (賀拔度拔) and his sons, led a counter-rebellion against one of the major rebels, Poliuhan Baling (破六韓拔陵), who had taken Wuchuan earlier, and they killed Poliuhan's general Wei Kegu (衛可孤), temporarily restoring order. However, soon Yuwen Gong and his sons were forced to flee and join the army of another rebel leader, Xianyu Xiuli (鮮于修禮). It was while serving under Xianyu that Yuwen Gong died in battle, and it was probably also at the same time that Yuwen Hao died as well. After Xianyu Xiuli was killed by his general Yuan Hongye (元洪業) in 526, another general, Ge Rong (葛榮), in turn killed Yuan and took over Xianyu's troops, and Yuwen Hu stayed with his uncles in Ge's army. In 528, after Ge was defeated by Northern Wei's paramount general Erzhu Rong, Erzhu forcibly moved Ge's troops, including the Yuwens, to his power base at Jinyang (晉陽, in modern Taiyuan, Shandong), where he remained for several years. In 531 or 532, when Yuwen Hu's uncle Yuwen Tai was serving under the general Heba Yue (賀拔岳, Heba Duba's son) in the western provinces, Yuwen Hu went to join Yuwen Tai at Pingliang. (When he did so, he left both his mother Lady Yan and his aunt (Yuwen Hao's sister) at Jinyang.) As Yuwen Tai had no sons at that point, when he was out on military campaigns, he entrusted his household to Yuwen Hu. Yuwen Hu was said not to be strict as the household's governor but was nevertheless able to keep the household organized and solemn. Yuwen Tai, when he saw this, stated, "this child's ambitions and talents are like mine." In 533, when Heba added the strategically important Xia Province (夏州, roughly modern Yulin, Shaanxi) to the ones he controlled, he made Yuwen Tai its governor. Yuwen Tai left Yuwen Hu to serve under Heba. When Heba's associate Houmochen Yue (侯莫陳悅) assassinated Heba in early 534, Heba's generals invited Yuwen Tai to serve as their commander, and he agreed. In the subsequent armed confrontation with Houmochen (in which Yuwen Tai defeated Houmochen, causing Houmochen to commit suicide), Yuwen Hu served as one of his uncle's generals.