In 722, while Emperor Xuanzong was at Luoyang, there was a coup attempt at Chang'an by the army officer Quan Chubi (), who had his nephew Quan Liangshan () claim to be the son of Emperor Shang and therefore deserving of the throne. The coup attempt was put down quickly, and Quan Chubi was killed. Emperor Xuanzong sent the mayor of Hunan Municipality, Wang Yi (), to Chang'an to investigate. Wang detained a large number of people but could not quickly come to resolutions as to who were responsible. Emperor Xuanzong made Song in charge of Chang'an and had him investigate. Song quickly determined who were the leaders and had them executed, and at his request, Emperor Xuanzong pardoned the rest of the detainees. In 724, when Emperor Xuanzong was set to visit Luoyang again, he again made Song in charge of Chang'an and made him minister of civil service affairs; he also awarded Song with silk. Around 725, when Emperor Xuanzong's trusted general Wang Maozhong () was set to have his daughter married, he invited the key government officials to the wedding banquet—but Song declined; Wang, who wanted the honor of Song's attendance, had Emperor Xuanzong order Song to attend, which Song did, but as soon as he had the chance to toast the emperor, he then claimed illness and left the banquet.