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.
The festival is still dominated by men though – 80 out of the remaining 97 performers are male solo artists or all-male bands.
Perhaps Eminem might boost the number of women performing if he brings Dido on stage for a version of ‘Stan’ like he did four years ago.
Reading and Leeds Festival 2017 will take place from August 25 to 27.