The singer, who has been widely rumoured for some time now, announced the news in a brief Instagram video live from Turin.
Sheeran - who is riding high at the top of the album charts with record-breaking new record Divide - completes this year's headline acts alongside Friday night bill-toppers Radiohead and Foo Fighters who'll play the Pyramid Stage on the event's Saturday night.
Foo Fighters were forced to cancel their Glastonbury 2015 appearance after the band’s front man Dave Grohl fell and injured himself during a gig in Sweden earlier that year. Florence + the Machine stepped in.
Currently, the only other confirmed acts include London Grammar, Wiley and The Avalanches. Organisers Michael and Emily Eavis recently confirmed that a full lineup announcement is due to be made later this month.
The Eavis' also revealed a new area that'll launch at this year's Festival which will be the last until 2019 due to the planned fallow year.
Spin-off event the Variety Bazaar will take place in a different location in 2021.
This year's Glastonbury Festival takes place from 21-25 June.