The comic wrote for O'Brien's NBC series in its infancy, teaming with Robert Smigel and Dino Stamatopoulos to pen many of the show's early sketches.
Louis CK revealed in an interview with writer Jonah Weiner that his first major decision was to lighten the tone of Late Night's first-ever opening sketch, which spoofed the pressure Conan O'Brien was under to replace David Letterman.
He explained: "[Conan] told me he was going to put a gun in his mouth [at the end of the sketch], and I was the new guy, and I said, 'Are you really going to do that?' and they were like, 'You think that's too dark?' and I said, 'You can't do that, that's vicious, that's really hard for people to take..'
"I talked them out of it, and it was like they were asking me for permission. 'Really, is it too much?' 'Yeah, guys, that's crazy.' A gun in the mouth, Jesus."
The writers took Louis CK's advice and changed the sketch's ending to O'Brien attempting to hang himself just before the opening credits rolled.
O'Brien's first few years were marred with frequent speculation that he would be axed by NBC for his initially low ratings. Louis CK insisted that the constant pressure was agonising, but eventually helped him to better understand comedy.
"It was hard to do, it hurt," he declared. "It was hard to do that, but I loved the work, I loved it, and Robert let me do anything I wanted to, anything… I got to shoot some really elaborate, crazy s**t there, and it's something I learned how to do - live comedy, sketch comedy with an audience, and I hunkered down, watching it happen."
The comic left Late Night with Conan O'Brien a few years into the show's run to write for The Chris Rock Show and The Dana Carvey Show and now stars in his own FX series Louie.
Louie is expected to return for a third season later this year.
> Louis CK to host Congressional Correspondents Dinner
> Conan O'Brien sells comedy pilot Fat Chance to TBS
Watch Louis CK, Robert Smigel and Adam Sandler in a comedy skit from Late Night with Conan O'Brien below: