FEARING he’d be killed, Jack Nicholson slept with a hammer under his pillow while involved in a bizarre Hollywood love triangle – and under the influence of drugs, the macho ladies’ man had shocking gay fantasies.

Those are just two startling details about the 76-year-old Hollywood legend revealed in the blockbuster tell-all “Nicholson: A Biography,” slated to be published Oct. 29.

The ENQUIRER got an  EXCLUSIVE preview of the sensational book, which rips the lid off the ups and downs of Jack’s amazing life.

In one bombshell revelation, best-selling author Marc Eliot discloses that the three-time Oscar winner feared for his life while involved with “The Mamas and The Papas” singer Michelle Phillips.

Nicholson was introduced to Phil­lips in 1970 after the sexy blonde singer had just divorced Dennis Hopper, Nicholson’s “Easy Rider” co-star. Incredibly, Hopper and Phil­lips had managed to stay married for only eight days before a physical brawl destroyed their relationship.

But when Jack took up with Mi­chelle, he was convinced hotheaded Hopper would come after him seeking bloody re­venge. Jack, 36 at the time, was so paranoid, he slept with “a hammer under his pillow,” according to Eliot.

What’s more, Jack believed everyone in Hollywood had a gun and “was sure Hop­per knew how to use his,” writes the author.

Ironically, when the two actors finally met to talk about Jack’s relationship with Mi­chelle, Hopper just laughed it off.

Although the “Chinatown”star had a reputation as a ladies’ man, Eliot says that Jack struggled with a gay secret. While under the influence of LSD, the actor experienced “castration fantasies” along with “homoerotic fear fantasies,” according to Eliot.

Always up for something wild, Jack frequented orgies thrown by his good friend Harry Dean Stanton in the late 1960s. The sizzling sex parties would involve “the hottest star­lets” and “all the available young men,” according to the book.

Jack’s skirt-chasing life­style led him to father four children with three different women. The happy-go­lucky “Batman” villain got hitched just once for seven years to actress Sandra Knight.

Jack was also friends with beautiful Sharon Tate, who was trag­ically slaughtered in 1969 by Charles Manson’s bloodthirsty gang. He be­came riveted by the Manson case and was often spotted in the courtroom.

“Jack, who was there almost every day, couldn’t get enough of it,” re­veals Eliot.

Sadly, the actor’s half sister Pamela Liddicoat was murdered 25 years later.

Despite his quirky nature, Nichol­son has always been an in-demand actor. He’s earned an astounding 12 Academy Award nominations – the most ever for a male actor – and is worth a staggering $400 million, says Eliot.

But his decisions have been far from flawless. He turned down the chance to play the iconic role of Mi­chael Corleone in “The Godfather,” leaving the part to Al Pacino. He also passed up starring in the classic Hollywood hit “The Sting.”

Says Jack: “I’m a fairly common man, a New Jersey personality…but I try to give the common man some extraordinary facet.”