After Sun Xiu ascended the throne, he appointed Yu Si, He Shao, Wang Fan and Xue Ying as Central Regular Mounted Attendants (散騎中常侍).[2] After a few years, Xue Ying resigned his positions due to illness.[3]
Service under Sun Hao
Early in Sun Hao's reign, he assigned Xue Ying as Left Upholder of the Law (左執法). After an unknown period of time, Xue Ying's position was changed to Master of Writing in the Selection Bureau (選曹尚書). After Sun Hao instated his son Sun Jin as crown prince in February or March 269, Xue Ying was made Junior Tutor of the Crown Prince (太子少傅), a position he held in addition to Master of Writing in the Selection Bureau.[4][5]
When Sun Hao surrendered to the Jin army in 280, Xue Ying helped Sun Hao to draft the surrender documents.[6]
Service under Jin
After Sun Hao's surrender, Xue Ying went to Luoyang. In an audience with Sima Yan (Emperor Wu), the emperor calmly asked Xue Ying, "Why did Sun Hao lose his kingdom?" Xue Ying replied, "When ruling Wu, Sun Hao was close to xiaoren and added punishments indiscriminately. He had no trusted officials or generals and everyone lived in fear. That is how he lost his kingdom." Sima Yan then continued asking about the abilities of the Wu officials who survived the invasion; Xue Ying was able to answer truthfully.[7]
^According to Sun Hao's biography in Sanguozhi, he ascended the throne on the same day as Sun Xiu's death, which is the guiwei day of the 7th month of the 7th year of the Yongan era of Sun Xiu's reign. This corresponds to 3 September 264 in the Gregorian calendar. Also in his biography, it was recorded that Sun Jin was made crown prince in the 1st month of the 1st year of the Jianheng era of his reign. (建衡元年春正月,立子瑾为太子...) Sanguozhi, vol.48. This corresponds to 19 Feb to 19 Mar 269 on the Julian calendar.