The crowd, which began showing up more than an hour early, stretched beyond the sitting area all the way back into the stacks by the time Craig Ferguson climbed onto a stage on the sixth floor of the Barnes & Noble in Union Square prepared to sign books and shake hands.

Just another sign of expanding fame. Mr. Ferguson, tall, dark and Scottish, surely ranks as the unlikeliest television performer ever to do the monologue/desk/guest routine five nights a week on American television.

But as the horde of impassioned fans demonstrated, he is making it work at 12:35 each weeknight as CBS’s follow-up to David Letterman’s “Late Show.” Last week Mr. Ferguson’s “Late Late Show” enjoyed an especially strong performance, averaging almost 2.5 million viewers, well ahead of his time-period competitor, Jimmy Fallon, on NBC.

Late-night hosts get into the book business with regularity, but mainly with books that amount to extensions of their acts. Mr. Ferguson, who has a previous novel (“Between the Bridge and the River”), has written an unsparing, and only occasionally amusing, autobiography, “American on Purpose: The Improbable Adventures of an Unlikely Patriot,” published last week by HarperCollins.

It recounts a life that qualifies as a triumph of art over anarchy, because Mr. Ferguson, who is 47, details how close he came to flushing his talent down a drain of dissolution thanks to heavy drinking and drug use in his youth.

“I proved to my own satisfaction that I am madder than I think,” Mr. Ferguson said in an interview before the signing. “It’s an understanding that there may be a darkness in there that’s bigger than you.”

Mr. Ferguson said he first thought about revisiting his turbulent life experiences when he was host of the White House Correspondents Dinner in 2008, not long after he had become an American citizen. “It’s such a punctuation mark,” he said. “You look at what led you to that point.”

What led him was a rough childhood in Glasgow, where he said he despised school “because I had such a bad experience with teachers early on.” He dropped out at 16.

He wasn’t especially funny at that point. “Humor wasn’t a currency, really,” he said. “It wasn’t useful.” Only later did he perceive the advantages: “I realized women and humor were linked very closely.”

But first he fell into another pursuit. He picked up drumming and was quickly good enough to play with several Scottish punk bands, including the Dreamboys, in the early ’80s.

A band mate, Peter Capaldi (who went on to success as an actor), got Mr. Ferguson to try stand-up — though not as himself.

“It was difficult for me at the beginning to just go out and be myself so I had to create a voice, ’cause if you fail it’s not you who fails, it’s the persona who fails,” Mr. Ferguson said. “And also I wanted a name that had a little shock value.”

And so Bing Hitler was born. “I might have gone a little overboard,” Mr. Ferguson said. “But there was no crooning or fascism involved.” Instead, the character was a sendup of “ludicrous patriotism for everything Scottish.”

It was also a hit. By the age of 24 Mr. Ferguson was selling out 3,000-seat theaters in Glasgow, though most nights he went on drunk or reached that point later.

The drugs followed, many varieties with typical effects. One night after dropping acid he was paralyzed with fear by ducks flying overhead, sure they were going to tear him to pieces.

An error has occurred. Please try again later.

You are already subscribed to this email.

Still, he was securing good acting roles and had had several committed relationships, including one marriage. But his career and his personal life were getting hurt by his addiction to drink. Finally, a friend got him into rehab, and he has been sober ever since.

Mr. Ferguson went on to work with the British comic Peter Cook and even played Oscar Madison in “The Odd Couple” — Glasgow version. “We did it exactly the same except for soccer references instead of baseball,” he said, “and we brought down the house every night.”

An American agent started sending him for auditions. He landed a recurring role in “The Drew Carey Show” as the boss, Mr. Wick.

“I liked the money, but it was boring,” Mr. Ferguson. So he decided to write a movie. He co-starred with Brenda Blethyn in “Saving Grace,” a modest hit in 2000. (A second film, which he wrote and directed, “I’ll Be There,” was not a success.)

The film work, on top of the comedy and the drumming, followed a running theme in Mr. Ferguson’s career: He is entirely self-taught. “It comes down to the early years of my academic life,” he said. “I couldn’t trust anyone who was willing to give me information.”

That changed when Peter Lassally, executive producer of “The Late Late Show,” came looking for a host to replace Craig Kilborn. He called Mr. Ferguson, who had been a guest on the show.

“I found it quite shocking,” Mr. Ferguson said. For one thing, he had not performed stand-up in 10 years. For another, he was, uh, Scottish. Mr. Lassally had worked with Johnny Carson and David Letterman, and Mr. Ferguson recalled being told by Mr. Lassally: “This is what I do: I find people like you. And if I’m right, you’re it.”

Mr. Ferguson took a two-day tryout as a lark. Within five seconds on his first night he wanted the job more than anything before in his life. “There was a sense of comfort I can’t quite explain,” he recalled. “There was a sense of belonging.”

One reason is that Mr. Ferguson has tried to make the late-night format his own, introducing inventive openings involving puppets and lip-synched musical numbers and turning the monologue into a mostly unscripted, stream-of-consciousness, high-wire comedy performance.

“I don’t know what the show is, but I know what it isn’t,” Mr. Ferguson said. Each night it can be something a little different, he added, a little unexpected.

That approach dovetails nicely with his serendipitous journey into late-night and his reasons for wanting to become an official American, Scottish accent and all.

“I think I make it up as I go along and so does America,” he said. “So that’s why it makes sense. You started it, but I wanted to be part of it.”

A version of this article appears in print on September 29, 2009, on Page C1 of the New York edition with the headline: Late-Night Transplant Looks Back At His Path. Order Reprints|Today's Paper|Subscribe