Updated

Robin Williams struggled to remember his lines.

This was unusual for the hyperverbal, Oscar-winning actor, and it hit him hard in Vancouver in 2014 during the filming of “Night at the Museum: Secret of the Tomb,” the third movie in the successful family franchise.

“He was sobbing in my arms at the end of every day. It was horrible. Horrible,” makeup artist Cheri Minns recalled. “I said to his people, ‘I’m a makeup artist. I don’t have the capacity to deal with what’s happening to him.’ ”

“He was sobbing in my arms at the end of every day. It was horrible. Horrible. I said to his people, ‘I’m a makeup artist. I don’t have the capacity to deal with what’s happening to him.’ ”

— Cheri Minns, makeup artist

Minns suggested to Robin that he return to stand-up to get out of his rut and reclaim some of his lost confidence. But Robin refused.

“He just cried and said, ‘I can’t, Cheri. I don’t know how anymore. I don’t know how to be funny.’ ”

How could this be the same lovable weirdo who coined the greeting “nanu nanu” as Mork from Ork; the radio DJ who famously brayed, “GOOOOOOD MORNING, VIETNAM!”; the widower therapist who broke our hearts in “Good Will Hunting”?

The reality — though Robin didn’t know it — was that he was suffering from a pernicious neurodegenerative disease that was in the process of robbing him of his talents, his brain and his very self.

This heartbreaking interaction is recounted in the biography “Robin” (Henry Holt & Co.) by Dave Itzkoff, out this month, which provides new details about the comic great’s final days and the harsh reality of what it’s like to lose a once-in-a-generation mind.

Robin McLaurin Williams, born in Chicago on July 21, 1951, had a privileged but lonely childhood, spending hours playing with toy soldiers in his attic. He attended Juilliard, then headed out West to blow up the Los Angeles and San Francisco comedy scenes.

Longtime friend Billy Crystal described seeing Robin kill on stage: “It was electric, and we all just sat there and went, ‘Oh, my god, what is this?’ It was like trying to catch a comet with a baseball glove.”

Robin landed the guest role of Mork from Ork on the hit show “Happy Days” in February 1978. The character was so indelible it led to a spin-off show, “Mork & Mindy,” which, by the following spring in 1979, reached 60 million viewers. Robin Williams was now a household name.

Despite rampant drug and alcohol addiction (he famously said cocaine was “God’s way of telling you you’re making too much money”), Robin easily found big-screen stardom. He earned an Academy Award nomination for his portrayal of the verbose Vietnam radio host in 1987’s “Good Morning, Vietnam.” Other critically acclaimed roles followed, including 1989’s “Dead Poets Society,” 1991’s “The Fisher King,” and 1997’s “Good Will Hunting,” which landed him an Oscar for his portrayal of a caring therapist to Matt Damon’s angsty genius.

Robin also piggybacked from one moneymaker to the next as the face of comedy. He voiced the spastic, singing Genie in Disney’s 1992 film “Aladdin” and played a cross-dressing nanny in 1993’s “Mrs. Doubtfire” and a man trapped in a board game in 1995’s “Jumanji.”

Robin Williams could evidently do no wrong. But a series of commercial and critical flops followed — from the maudlin (1998’s “Patch Adams”) to the dark (2002’s “Death to Smoochy”) to the plain unwatchable (2009’s “Old Dogs”). Meanwhile, his long-running issues with drugs and alcohol resurfaced, and after his family staged an intervention, he checked himself into a rehab facility in 2006. In recovery, he met his third wife, Susan Schneider, whom he wed in 2011. (He married first wife, Valerie Velardi, in 1978, and the two had a son, Zachary, now 35. They divorced in 1988, and the next year, he wed his son’s nanny, Marsha Garces. The two were married for 19 years and had daughter Zelda, 28, and son Cody, 26.)

He was a “stimulus junkie,” whose anxieties came from his work. “The line of work he was in bred anxiety and self-centered concerns. He would always say, ‘You’re only as good as your last performance,’ ” Susan says in the book.

The magical 1990s success eluded him as he jumped from one low-budget project to the next until CBS announced his return to the small screen in “The Crazy Ones,” which premiered September 2013. He played Simon Roberts, an aging ad-agency founder, who must cede control of his business to his daughter.

But the magic wasn’t there.

“Williams seems exhausted,” one review read. “So is this show.”

That’s where the trouble began.

Robin began to complain about an array of symptoms: indigestion, trouble urinating, insomnia, loss of his sense of smell and heartburn. A slight tremor cropped up in his left hand, which was attributed to a shoulder injury.

Susan describes the avalanche of symptoms: “It was like playing whack-a-mole. Which symptom is it this month? I thought, is my husband a hypochondriac? We’re chasing it and there’s no answers, and by now we’d tried everything.”

He dropped weight, his once booming voice became tremulous, and he stooped. Producers and colleagues noticed the change.

Pam Dawber, Robin’s co-star from “Mork & Mindy,” joined the cast of “The Crazy Ones” to raise ratings. On set, Dawber saw a deeply changed man from the riotous and often inappropriate (she says Robin groped and flashed her on set) man she had worked with decades before.

“I would come home and say to my husband, ‘Something is wrong. He’s flat. He’s lost the spark. I don’t know what it is,’ ” Dawber says in the book.

“I would come home and say to my husband, ‘Something is wrong. He’s flat. He’s lost the spark. I don’t know what it is.’ ”

— Pam Dawber, Williams' co-star on "Mork & Mindy" and "The Crazy Ones"

CBS canceled the show after one season as ratings dropped from a high of 15.5 million to just about 5 million by the finale.

Friends thought Robin was depressed over the cancellation, but other strange behaviors started to emerge that couldn’t be so easily explained. He grew paranoid over a belief that people were stealing from him. On the set of “Night at the Museum,” he suffered a severe panic attack and was placed on antipsychotic medication.

Billy Crystal described seeing his old friend after a four-month absence, finding him frail, skinny, and, most disconcerting, “uncharacteristically quiet.”

When they said their goodbyes after dinner, Robin burst into tears.

“What’s the matter?” Crystal asked.

“Oh, I’m just so happy to see you. It’s been too long. You know I love you,” Robin said.

On May 28, 2014, Robin was diagnosed with Parkinson’s disease, a degenerative disorder that impairs motor functioning. Doctors assured him that they had drugs that could control the tremors and that he likely would have another “10 good years.”

Robin kept his diagnosis close to the vest, sharing it only with his children, family members and inner circle.

“I never heard him afraid like that before,” Crystal said. “This was the boldest comedian I ever met — the boldest artist I ever met. But this was just a scared man.”

“I never heard him afraid like that before. This was the boldest comedian I ever met — the boldest artist I ever met. But this was just a scared man.”

— Billy Crystal

To Robin, “it was the realization of one of his most deeply felt and lifelong fears,” Itzkoff writes. In a 1991 interview with Playboy during the publicity tour for “The Fisher King,” Robin discussed that latent fear two decades before it would touch him personally.

“There’s that fear — if I felt like I was becoming not just dull but a rock, that I still couldn’t spark, still fire off or talk about things, if I’d start to worry or got too afraid to say something . . . If I stop trying, I’d get afraid,” Robin said.

Two decades after he spoke those words, Robin was clearly afraid.

Robin went on an apology tour, begging for forgiveness (where none was demanded) from his three children for the way he treated them when he was in the throes of a drug addiction. He asked comedian Dana Carvey to forgive him for stealing bits (an allegation that dogged Robin earlier in his career), though Carvey insisted that he hadn’t.

Robin checked himself into a the Dan Anderson Renewal Center, a rehab facility in Minnesota, to be “cloistered on a campus where he could receive close supervision, and where he could meditate, do yoga and focus on further 12-step work that, it was hoped, would help him manage his illness.”

But this wasn’t enough — this was not a drug addiction, it was a degenerating brain illness. He didn’t know it then, but there was little to be done.

Click here for more from the New York Post.