He sang the lyrics (taken from the George R.R. Martin book A Dance with Dragons): "He rode through the streets of the city / Down from his hill on high / O'er the winds and the steps and the cobbles / He rode to a woman's sigh / For she was his secret treasure / She was his shame and his bliss / And a chain and a keep are nothing / Compared to a woman's kiss / For hands of gold are always cold / But a woman's hands are warm."
Arya told Ed's character, "It's a pretty song, I've never heard it before," to which he responded, "It's a new one."
The Shape of You singer, who's previously showed off his acting chops on The Bastard Executioner in 2015, was a major get for the show, whose creators David Benioff and DB Weiss said they had been trying to get him to appear "for years", as Williams is a huge fan of the Grammy-winner.
Ed Sheeran sang in the Game of Thrones scene. Photo / HBO
Ed Sheeran appeared alongside Maisie Williams in Game of Thrones. Photo / HBO
"We tried to get Ed Sheeran on the show to surprise Maisie, and this year we finally did it," Benioff said in March while appearing at the festival South By Southwest in Austin, Texas.
Social media was popping after the Castle on the Hill crooner's cameo on the medieval-themed programme, which in the past has welcomed musicians Gary Lightbody (Snow Patrol) and Will Champion (Coldplay) in front of its cameras.
Even David Beckham had something to say, sharing a screengrab on social media and simply writing: "Yes Ed" across the top of the picture.
Among the other responses were writer Matthew Yglesias who tweeted, "The Ed Sheeran thing was weird," while user Johnny Mac wrote, "Zomg @edsheeran dropping the new single on #gameofthrones"