On Wednesday night on CBS, after 33 years as a host, the longest late-night tenure ever, Mr. Letterman will close out his career with his 6,028th episode. His influence has been substantial: He breathed new life into the talk show, taking it beyond the traditional desk-and-sofa interview sessions with an array of innovative, often outlandish antics; he gave birth to many careers; he became a role model for a generation of comedians, including most of the current late-night roster; and he turned signature segments like Stupid Pet Tricks and his Top 10 list into American cultural institutions.

He was also front and center for memorable noncomedic moments, whether hosting the first late-night show after the Sept. 11 attacks, turning his 2000 heart surgery into a narrative on his show or castigating John McCain after he canceled an appearance before the 2008 presidential election.

Mr. Letterman lived out some dark moments on his show as well. In the mid-1990s, after his ratings began to slide, his well-known tendency to self-flagellate turned nearly literal one night when he viciously beat up a David Letterman dummy on stage. In 2009, in one of television’s most uncomfortable moments, he acknowledged that he had had sex with female staff members.

He could be a brusque interviewer who sometimes made his guests squirm. He was fiercely private, rarely giving interviews, and his disdain for the politics of show business played a role in his failure to land the dream job he had long coveted: succeeding Johnny Carson as the host of “The Tonight Show” in 1992. In an unusually public competition for the job, Mr. Letterman lost out to Jay Leno, and he spent most of the next two decades trailing Mr. Leno in the ratings.