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.