The singer, who has dominated the charts with his latest album Divide, will make his only festival appearance on Sunday, June 25.
Sheeran revealed the rumours were true with a short Instagram film in which he described the news as ‘awesome’.
In the clip, he started off saying: ‘Hello from Turin.
‘We’re here, I’m starting the tour off today and I want to make an announcement. I am headlining Glastonbury on the Sunday night, which is awesome.’
Radiohead will be performing on the Pyramid stage on Friday, while Foo Fighters will top the bill on Saturday night.
Sheeran previously spoke about his desire to play at Glastonbury.
He told Press Association in 2015: ‘The next festival I do will be headlining Glastonbury, but it just won’t be next year .’
The full Glastonbury line-up has yet to be revealed although organisers blasted previous rumours as ‘fake news’.
Glastonbury Festival takes place from Friday, June 23 to Sunday, June 25.