The role "came out of nowhere," Smith said Monday on "Good Morning America," explaining that he was offered the part on a Friday night only and had until the following Monday to decide whether to accept the role.
"That was a really tough weekend because Robin Williams smashed this thing so hard. When you take a role like this, you want to find where there's some meat left on the bone...what would you do differently?" Smith explained.
"The one thing that I latched on to was the idea that it was going to be live action, so...that left a little bit of room," he continued. "The hip-hop angle was the angle that I saw that would be my in."
Smith praised the film as the most fun project he's worked on and hailed the work of the crew and his co-stars.
WATCH: First full 'Aladdin' trailer complete with 'A Whole New World'
"Naomi [Scott] does a brilliant job as Princess Jasmine," Smith said. "[Director] Guy Ritchie did a great job, added such an edge to it, so I can in good conscience encourage you to go see this one."
"I made some questionable [films] in the past. I'm man enough to stand up to that, but this one -- this is such a beautiful, beautiful movie," he said.
The film, based on Disney's 1992 animated classic, stars Smith as Genie, Mena Massoud as Aladdin, Scott as Jasmine, Marwan Kenzari as Jafar and Navid Negahban as the Sultan.
"Aladdin" hits theaters in the United States on May 24, 2019.
MORE: These Disney movies are hitting the big screen in 2019
The Walt Disney Compay is the parent company of this station.