He hit the stage following a montage of music moments in film and performed the song, for which he won Best Original Song at the 2003 Oscars from the film 8 Mile.
During Eminem’s performance, many stars in the crowd sang along and danced, including Brad Pitt. Up until that point, the proceedings had been relatively sedate.
The 47-year-old rapper received a standing ovation from the crowd following his performance.
Many people on Twitter were excited about Eminem’s surprise performance.
Ahead of his performance, Lin-Manuel Miranda spoke about the importance of songs featured in film.
“You couldn’t take the song out of the movie and you couldn’t take the movie out of the song,” Miranda said.
Following his performance, Eminem tweeted: “Look, if you had another shot, another opportunity… Thanks for having me @TheAcademy. Sorry it took me 18 years to get here.
He attached a video of Barbra Streisand announcing his Oscar win in 2003.
He did not attend the awards show in 2003 because he previously said he didn’t think he would win.
“I just felt like I had no chance of winning because, you know, when I heard I was nominated, I thought that was for actors,” he said in 2007. I was not sure what exactly Grammy or Oscar meant, what certain awards meant, I was not sure what they meant, so even MTV awards, all that stuff, I just didn’t know what awards meant and this particular award…I didn’t go to the show… I just felt like I had a snowball’s chance of hell of winning.”
“At that point, in my life I always thought like rap never gets as fair shake on anything. That was one of the reasons I didn’t go for the first Grammys I was invited to, because I pretty much protested it. I didn’t understand why there was a rap category and best album category and I couldn’t understand why rap album can not be in the best album category.”
Eminem’s performance comes after the release of his new album, Music to Be Murdered By.