The network had revamped Studio 6A at its 30 Rockefeller Plaza headquarters, installing roughly 100 seats so that “Megyn Kelly Today” would have its own cheering squad. But with sharp questions and comments, Ms. Kelly offended celebrity guests like Debra Messing and Jane Fonda. Of more importance to network executives, she delivered middling ratings.

By the time one of NBC’s biggest events came around — the 2018 Winter Olympics in Pyeongchang, South Korea — Ms. Kelly was not among the correspondents sent to cover it.

In May 2018, during the network’s annual presentation to advertisers known as the upfronts, there was another sign that her stock was down at NBC. From the Radio City Music Hall stage, the late-night host Seth Meyers mentioned the network’s broadcast of “Jesus Christ Superstar,” with John Legend in the lead role, before remarking: “You know a network has some range when they have a black Jesus and Megyn Kelly.” The joke was a reference Ms. Kelly’s much-criticized statements, made during a 2013 segment on Fox News, that Santa Claus and Jesus were white.

And then came the Oct. 23, 2018, episode of “Megyn Kelly Today.”

‘I’m a Little Fired Up’

Ms. Kelly opened the show by announcing: “I have to give you a fair warning. I’m a little fired up over Halloween costumes this morning.”

What followed was a segment out of the Fox News playbook: a round-table discussion of how multiculturalism was supposedly affecting the celebration of a national holiday.

“But what is racist?” Ms. Kelly said. “You do get in trouble if you are a white person who puts on blackface on Halloween, or a black person who puts on whiteface for Halloween. Back when I was a kid, that was O.K., as long as you were dressing up as a character.”

Those remarks were the last straw for NBC.

Ms. Kelly offered an on-air apology the next morning. She also hosted a segment featuring two black panelists, Roland Martin and Amy Holmes, who explained the history of blackface, a demeaning practice with a history going back to 19th-century minstrel shows.