Being asked to host the Oscars isn’t all it’s cracked up to be. Last December when Jimmy Kimmel was at the airport, coming home from a relaxing family vacation in Hawaii, he took a phone call from his agent with the offer. After he hung up — “my response was not one of enthusiasm,” he confesses — he dreaded facing his wife, TV writer- producer Molly McNearney, who had lived through his hosting the Emmys just three months earlier.

“As I approached her, I felt like I was going to tell her I wrecked her car or something,” Kimmel says. “Then we got home, and I had a vicious migraine all night. It wasn’t your typical celebration.”

This Sunday, Kimmel faces off in front of millions of viewers for the most thankless job in show business. The track record of many past Oscar hosts has been jinxed, with reviews ranging from bad (Neil Patrick Harris in 2015) to worse (Seth MacFarlane in 2013) to scorching (the incredibly awkward duo of James Franco and Anne Hathaway in 2011). In fact, the only masters of ceremonies in the past decade to emerge unscathed from the gig were Hugh Jackman (2009) and Ellen DeGeneres (2014), both of whom turned down offers to return. It’s better to quit, they decided, while you’re ahead.

Art Streiber for Variety

None of this is lost on Kimmel, 49, the amiable host of late-night talk show “Jimmy Kimmel Live!” on ABC. “I made a decision to try to enjoy the process and be optimistic,” he says. “That said, my subconscious still tells me it’s going to be a disaster. This is a no-win situation. Even if it goes great, you get a lot of shit from a lot of people.”

Although his Emmy telecast was well reviewed, it was the lowest-rated in TV history, with only 11.3 million viewers tuning in to see the sweep by “The People v. O.J. Simpson.” So why host the Oscars at all? “I don’t know why,” Kimmel says drolly. For starters, his agent didn’t really present it as an offer he could turn down — not that Kimmel would. And it’s not as if he didn’t know an offer might be coming, whether he wanted it or not.

“It’s like a Super Bowl for a comedian,” he says. “I think there are certain things that are major touchstones or milestones” — he reflects for a second — “some kind of stones, maybe gallstones. This is the biggest of them all. I won’t even say I like a challenge. Challenges are overrated. But I feel like I have to do it. There’s a lot of negativity that goes along with it, but it’s a pretty great feather to have in your cap. And it’s something that you can tell your grandchildren about.”

Kimmel is the first Oscar host to take on the job fresh off the Emmys, a twofer that has led to restless nights in which he often dreams about jokes.“Originally, it seemed a bit daunting,” says “Kimmel” co-head writer Danny Ricker. “But it’s kind of nice that we have muscle memory for Jimmy hosting a three-hour awards show.”

Kimmel received a high-profile endorsement early on, when Disney-ABC Television Group president Ben Sherwood publicly stated last September that he hoped the Academy would choose the late-night host. So why did it take almost three months for him to get the job? “The producers of the telecast pick the host,” Sherwood says, adding that ABC (which will air the ceremony through 2028) doesn’t have a say in the process. “I never suggested it officially to anyone.”

Sherwood reveals that Kimmel had been on the Academy’s short list for at least two years. “Not only will he be great hosting the Oscars, we get to spread the cost of his tuxedo over two shows,” Sherwood jokes, referring to the Emmys. “He’s a perfect fit. He’s the king of viral video. He’s got great man-on-the-street instincts. You’re going to see him bring all his talents and comedy to bear on the Oscar stage.”

Oscar producers Michael de Luca and Jennifer Todd didn’t extend their invitation to Kimmel until a few weeks before Christmas, which led to rampant speculation that he wasn’t their first choice. (They say he was.) Kimmel thought he’d been passed over, and his team almost took him out of the running because they got tired of waiting for the offer.

“I assumed there was a long list of people they asked before me,” he says. “I fully interrogated Mike and Jennifer, and they swear it’s not true.” He thinks about it. “If anyone was asked before me, my guess would be Matt Damon and Ben Affleck.” (Todd, who runs Damon and Affleck’s production company Pearl Street Films, says, “That’s hysterical. Those guys would never host an awards show. It’s too much work.”) Finally, Kimmel says, “I would have liked to have a little more heads-up.”

Kimmel will be steering the Oscars at a time when movies are struggling to stay ahead of TV in the water-cooler wars. None of the nine movies nominated for best picture is a major blockbuster — though “Hidden Figures” and “La La Land” both recently crossed $100 million at the U.S. box office. “I would have liked to have seen ‘Deadpool’ get nominated,” Kimmel says of the 20th Century Fox comic-book tentpole that was snubbed in all categories despite getting Golden Globe nominations. “I do think there’s a certain type of movie that’s not considered for awards. It’s a shame, because there’s nothing serious about the movies; they’re an escape.”

Art Streiber for Variety

The ratings for recent Oscar telecasts on ABC have been down, with the boozier Globes taking away some of their thunder. Last year’s Academy Awards show, headlined by Chris Rock, hit an eight-year low, with 34 million viewers. Kimmel has so much to worry about — he says he doesn’t get enough tickets to invite all his friends, although his parents are coming — that he’s not sweating the numbers.

“I think it has very little to do with me,” Kimmel says, acknowledging fractured viewing habits. “I don’t care if the Oscars are up 3%. I don’t care if they’re down.” Other producers have tried to interject hipness into the long telecast (Hello? Presenter Zac Efron?), to little success. This year, an effort to shake up the nominations by recording pre-taped testimonials from past winners like Jennifer Hudson and Marcia Gay Harden was mocked on Twitter as coming across like an infomercial. Kimmel slept through the nominations announcement. “I never get up early to watch anything,” he says. “I always figure it will still be there.”

Unlike hosting recidivists Billy Crystal and Jackman, Kimmel doesn’t sing or dance. But he can make a room explode in laughter. For the Emmys, he enlisted Jeb Bush to play a chauffeur in a pre-recorded bit by personally emailing him and flying to Florida to shoot the scene. “I just pestered him until he had no choice,” Kimmel says. “He said, ‘All right, you maniac, I give up!’” While he won’t reveal how he’ll open the Oscars, he doesn’t rule out a cameo from Hillary Clinton. “Possibly,” he says. “I’m not saying that to be coy. I’m saying that because I don’t know.”

Under President Trump, the Globes and SAG Awards doubled as political rallies, with fiery speeches from winners like Meryl Streep and Mahershala Ali. The political situation at the Oscars is already heating up — after Trump’s Muslim ban, UTA canceled its party, instead donating $250,000 to the ACLU, and Iranian director Asghar Farhadi (foreign language nominee for “The Salesman”) issued a statement that he would not attend the ceremony. But Kimmel doesn’t see it as his job to stir up Hollywood’s liberal outrage. “I don’t think it will be very political,” he says of his monologue. “There will be some element of that to the show. A lot of it depends on what happens.”

Similar to the Emmys, he has enlisted the 14 members of his writing staff to craft his opening number and other jokes. “It’s too early to write political jokes, because the things that are happening today will feel dated,” says McNearney, the “Kimmel” show’s other co-head writer, who watches from backstage, scribbling last-minute zingers on Post-it notes. “If Trump doesn’t want to be on the broadcast, he has to be on his best behavior in the days leading up to it.”

One advantage in Kimmel’s corner is that he’s an avid movie-lover. He lists his appreciation for “La La Land” (even though he doesn’t like musicals), “Moonlight,” “Manchester by the Sea,” and “the movie with aliens” (that would be “Arrival”). He watches up to four a week, to prepare for quizzing celebrities on his late-night show.

In the winter, Ryan Gosling taught him how to waltz, a moment that didn’t make his heart swoon like you’d expect. “I’m naturally kind of shy,” Kimmel says. “Even though I’m dancing with another man and you’d think it would be all laughs, there’s something about it that’s just a little weird. I’ve never had a dance lesson before.”

He had Mel Gibson shave his beard on national TV while promoting “Hacksaw Ridge.” And he told Casey Affleck he was staunchly backing him in his awards campaign for “Manchester by the Sea” after learning which other actor almost had the role. “Whatever makes Matt Damon unhappy makes me happy,” Kimmel says about his pretend nemesis. “So yes, I’m still rooting for Casey.” Those personal relationships with celebrities could help him win over the room at the Oscars. “You want the audience to laugh,” Kimmel says. “If you get that, the people at home will as well.”

Kimmel discovered the power of the big screen from a young age. As a kid in Las Vegas who grew up without cable TV, he spent every summer Tuesday at a 25-cent movie theater watching “Swiss Family Robinson” and “Peter Pan” (which he saw three times in a row in a single day). “My cousin Ann would drag a huge purse into the movie theater that was filled with burnt popcorn,” Kimmel remembers. “It would get confiscated about half the time. It was always a bummer when teenage ushers took our food away.”

Kimmel has been cramming for the upcoming show by watching old Oscar telecasts to get into the rhythm, and he defends the honor of his idol David Letterman, who was panned for his disastrous 1995 duties. “I do know why Dave got flack,” he says. “It’s because Dave badmouthed his own performance the next day. If you were a fan of ‘Late Night With David Letterman,’ you enjoyed it.”

The theme of this year’s show, according to the producers, is the evergreen celebration of movies. “When we’re not being earnest, we want to be funny,” De Luca says. There will also be sobbing during the tribute to all the actors who died. It’s been a particularly hard year, with the passing of Debbie Reynolds, Carrie Fisher, Gene Wilder, Anton Yelchin and others. “One thing I can promise: This is going to be the greatest ‘In Memoriam’ in Oscar history,” Kimmel says. “Kudos to God’s booker, because he or she really scored this year.”

Kimmel recorded a tribute to Mary Tyler Moore for his show in which he threw a knit cap in the air. But many of his younger Twitter followers didn’t get the reference, dissing his hair for looking ruffled. He handles his Twitter account himself, reading all of his own mentions, which could cause pain if there’s criticism for the Oscars. “For a while, people were accusing me of plucking my eyebrows, which I have never done in my life,” Kimmel says. “It starts to make you self-aware.”

Kimmel has spent 14 years on late-night TV, working 70 grueling hours a week as a micromanager who tinkers with everything from his promos to his opening monologue, which he rewrites every afternoon. “I said to my wife the other day, ‘I did not get into comedy to look at Excel spreadsheets.”

The landscape has changed dramatically since he started, with Stephen Colbert duking it out with Jimmy Fallon for the top spot, leaving Kimmel in perpetual third place. He has thought about retiring his show after his contract is up in 2019. “I want to go out on my own terms,” Kimmel says. “If we ever feel like we’re repeating ourselves, I think it’s a good indication that it’s time.”

What would he do with his free days? He’s got some ideas. “I like to draw. I like to make sculptures. I’d like to write a book at some point. Doing the show every day doesn’t leave time for that.”

And he laughs when asked if he’d consider more Oscars hosting. “I’m just going to focus on the one and see how it goes,” he says. “It’s funny, because part of the reason I was asked to do this is because the Emmys went well. If I do really well, I’m just going to have to do it again.”