The 26-year-old was dressed as a soldier and singing around a campfire, introducing viewers to the song Hands of Gold, when he caught the attention of Maisie Williams's Arya Stark as she rode through a forest on horseback.
Stark told Sheeran's unnamed character: "It's a pretty song, I've never heard it before."
"It's a new one," Sheeran replied.
The singer-songwriter celebrated his appearance, posting a shot of his performance on Instagram after tuning into the show.
"Throwback to the time I was a Lannister," he wrote.
Sheeran's cameo divided fans on social media.
Nadine tweeted: "How awesome is @edsheeran in that scene with Arya Stark?"
Lyndsey Vanstone added: "Amazing cameo from @edsheeran in @GameOfThrones season 7 premiere!"
ed sheeran in game of thrones is everything i never knew i needed— Meghan Rienks (@MeghanRienks) July 17, 2017
Game of Thrones premier tonight awesome Ed Sheeran was in it!!!! 2 days before I get to see him in Quebec City really can't wait— Patricia Jael (@patricia_jael) July 17, 2017
His appearance also caught the attention of comedian Leslie Jones, who tweeted: "Hey I know who that is!!"
Others were not so impressed, with some expressing the hope that Sheeran might get eaten by Arya's direwolf Nymeria, who is expected to make an appearance in the next episode.
Arya's direwolf returning and eating Ed Sheeran is all I care about now.— Michael D. Fuller (@michaeldfuller) July 17, 2017
Others felt that Sheeran's fame, and status as one of the most ubiquitous musicians of the moment, made the cameo fall a little flat.
"If Arya doesn't burn Ed Sheeran he'll come back as a white walker and be playing Westeros Glastonbury for thousands of years," Zack Jones tweeted.
#GameOfThones writing room:— Kyle Ethan (@kesnyder42) July 17, 2017
"Ok we're beyond the books, we have creative control"
"Concept: Ed Sheeran camping in the woods singing a song"
game of thrones: we're a prestige show pls take us seriously— tori (2017) (@grinchhands) July 17, 2017
game of thrones: here's arya eating a squirrel next to ed sheeran
Only way to justify Ed Sheeran's #GameOfThrones cameo is for him to greet Bran with: "When your legs don't work like they used to before..."— Charlie Potter (@Charlie_Potter) July 17, 2017
Another, Mike Ryan, noted: "Ed Sheeran's Game of Thrones introduction had all the grace and nuance as the time Alice and the gang at Mel's Diner met Jerry Reed."
Still more felt that, by allowing such a high-profile cameo to take place in the first place, the show was "selling out".
The Ed Sheeran cameo though? C'mon DB & DBW... y'all are better than that. #sellout— Burt Macklin (@brittany_efff) July 17, 2017
Lol look at #GameOfThrones also being such a sellout by bringing in Ed Sheeran, that was completely uncalled for— Liberal fahashist (@UpupandAwai) July 17, 2017
Game of Thrones creators David Benioff and DB Weiss previously announced the singer would make an appearance as they spoke at a panel at South By Southwest Festival in Austin, Texas.
It is not the first time a musician has featured in the show. Coldplay, Sigur Ros and Mastodon have also had small parts in the hit series.
The HBO series based on George RR Martin's A Song Of Ice And Fire novels will reach its conclusion in the final season next year.
The show has scooped 38 Emmy Awards, more than any other narrative show.
Catch up on Game of Thrones season six now with a 14 day free trial with NOW TV