 Because of his heritage, he was made an officer in the imperial guards early.In 755, the general An Lushan rebelled at Fanyang, and by summer 756 the armies of his new state of Yan were approaching Chang'an, forcing Emperor Xuanzong to flee.After Chang'an fell to Yan forces, Yan forces tried to force Han Hao to serve in the Yan administration.