Eminem last played Reading and Leeds in 2013 and festival organiser Melvin Benn called his comeback ‘beyond exciting’.
He said: ‘His 2013 headline performance was incredible and I can’t want to have him back.’
Other performers set to perform include Fatboy Slim, Bastille, Everything Everything, Charli XCX, Lethal Bizzle and You Me At Six.
The festivals were criticised earlier this year when the initial line-up was released featuring just one female performer.
Chrissy Costanza, who fronts American band Against The Current, was the only woman included on the bill last month.
She will now be joined by another 16 acts that feature at least one woman, including all-female group Haim and BBC Sound of 2017 winner Ray BLK.