Jack Nicholson is in the grips of a life and death struggle as pals fear it could be “THE END” for the Hollywood legend, The National ENQUIRER has exclusively learned.

The 77-year-old Academy Award–winning great is battling the onset of Alzheimer’s disease and seems a shell-shocked wreck, close friends divulged.

The “Chinatown” star – worth an estimated $400 million – rarely steps out these days from his Hollywood home and when he does, he appears disoriented and confused.

An exclusive ENQUIRER photo showed the divorced dad-of-five on September 18, arriving at a restaurant in Beverly Hills.

An eyewitness said: “Jack seemed very confused as to exactly where he was going when he arrived.

“His hair was unkempt and he had a spaced-out look.

“Jack used to be the King of Hollywood – but now he appears a feeble old man.”

A close source said: “Raise the ‘A’ word – Alzheimer’s – to Jack and he’ll answer you back with an expletive! He doesn’t want to hear it.

“All Jack will say is, ‘Live the life I have over the last four decades and you try to remember every damn thing.’

“But it’s pretty clear that he is fading, not only physically, but his memory as well.

“Sometimes Jack seems a million miles away when you try to have a conversation with him.”

Added another pal: “The rumor is he has the beginnings of Alzheimer’s disease. No one knows exactly the medical secret he might be hiding.

“These days – with the exceptional rare outing – he stays pretty much holed up in his multi-parcel compound on Mulholland Drive, surrounded by his $100 million art collection – and he doesn’t take many visitors.”

While making no official announcement, Jack has quietly retired from acting, according to published reports.

The actor’s last starring role was in Rob Reiner’s “The Bucket List” in 2007. He hasn’t acted since a supporting role in 2010’s “How Do You Know.”

The pal divulged, “Jack grouses they don’t make roles for men like him anymore. The truth is I think he’s afraid to take a new film for fear he won’t remember the lines.”

Friends believe Jack’s years of living the high life may be responsible for his waning memory.

Acclaimed biographer Marc Eliot wrote in his 2013 book “Nicholson” that the star was a “chronic drug user in the early years of his career,” and used LSD in the early 1960s, adding cocaine and marijuana use continued beyond that time.