Updated

Conan O'Brien is close to signing a nearly $40 million deal to walk away from his dream job hosting NBC's "The Tonight Show," bringing down the curtain on one of the entertainment industry's biggest debacles in years.

The comedian's exit agreement, which could be completed as early as Tuesday, bars O'Brien from bad-mouthing his former NBC bosses, according to people familiar with the matter, but paves the way for him to land another television gig within a year.

The expected departure ends a nearly two-week public spectacle that engulfed NBC, after the network tried to displace O'Brien from his 11:35 p.m. Eastern slot and move him a half hour later. The battle, which will end with Jay Leno retaking the late-night perch he held for 17 years, prompted the two comedians to take on-air swipes at each other and at the network.

"What does NBC stand for?" Mr. Leno asked viewers the day the news broke of the shake-up. "Never Believe your Contract." While he said that "so far, nobody's said anything to me," people familiar with the matter say he had already broadly agreed to abandon his four-month foray into prime time.

O'Brien shot back on air: "No matter what happens, it's been a real honor to sit in the same chair as Steve Allen, Jack Paar, Johnny Carson, Jay Leno, and Jay Leno."

NBC Universal Chief Executive Jeff Zucker said in an interview that "we were not surprised that Conan was disappointed in having his show back up a half hour. But we were very surprised and disappointed at how nasty it turned."

Continue reading at The Wall Street Journal