Speaking at the SXSW film festival in Texas, David Benioff and Dan Weiss said they'd been trying to book him for a while.
Ed also confirmed the news as reports started to appear online by tweeting "guess the cat's out the bag".
It's not clear what role he'll have in the show.
The panel at SXSW also featured stars Sophie Turner and Maisie Williams.
It was suggested that the Ed Sheeran booking was made as a surprise for Maisie because she's a big fan of the singer.
Ed's not the first musician to appear in Game of Thrones.
Previous musical cameos have included members of Coldplay, Mastodon, Of Monsters and Men, and Sigur Ros.
There's no confirmation if he'll be performing, like Sigur Ros and Of Monsters and Men, or if he'll even be recognisable on screen.
When Mastadon appeared in the show they were transformed into zombified members of the Wildlings group.
David Benioff and Dan Weiss also confirmed the eighth and final season of the show will only contain six episodes, making it the shortest yet.