 He was much favored by Emperor Wu's regent Yuwen Hu, and he became a commander of Yuwen Hu's personal guards.After Emperor Wu killed Yuwen Hu and personally took power in 572, he made Yuwen Shu the deputy minister of imperial clan affairs, and eventually, he was created the Duke of Boling, and then the Duke of Puyang.In 580, after the death of Emperor Wu's son and successor Emperor Xuan, Emperor Xuan's father-in-law Yang Jian seized power as regent, and the general Yuchi Jiong, suspicious of Yang's intentions, rose against him at Xiang Province (相州, roughly modern Handan, Hebei).