Emperor Muzong died in 824 and was succeeded by his son Emperor Jingzong.
By 825, Niu had come to the conclusion that Emperor Jingzong was frivolous and not diligent, and that wicked people around Emperor Jingzong wielded actual power.