The rock band join Foo Fighters and Kanye West at the top of the bill for the sold out festival next month, reported BBC online.
Roger Daltrey said The Who would "close this year's event with a bang".
The band will also headline the British Summertime Hyde Park festival with a show on Friday 26 June, supported by Paul Weller, Kaiser Chiefs, Johnny Marr and Gaz Coombes.
Paul Weller will also play before The Who at Glastonbury, in the penultimate Sunday night slot on the Pyramid Stage.
"It's great to be ending this part of a 50-year career at the most prestigious and respected music festival in the world," said Daltrey.
