Our image of James Bond — the ultra-cool, impeccably dressed bon vivant who picks off spies and always has time for Pussy Galore — is at odds with the one we get of Ian Fleming, the man who created the iconic character in a series of best-selling novels.

“Fleming: The Man Who Would Be Bond” portrays him as a dissolute playboy with a weakness for S&M.

The four-hour miniseries, which debuts Wednesday night, has the same sobering effect as HBO’s recent movie about Alfred Hitchcock, which portrayed the famed director as a vindictive sadist. Fleming, we learn, was a violent sadomasochist. He drank too much, cheated on his wife and always felt like a loser compared to his heroic brother Peter (played by Rupert Evans).

British actor Dominic Cooper plays Fleming and says, “I was shocked by his behavior.”

The moments that run the greatest risk of ruining Fleming’s reputation are the sex scenes, especially those with Ann O’Neill (Lara Pulver), the woman he would eventually marry.

Cooper cuts a striking figure as Fleming.BBC America

The first time we see them together, Fleming throws her to the floor and brutalizes her. “He used to beat her,” says the series’ director Mat Whitecross. “He called her his ‘black-and-blue Annie.’ He would dominate her, then come with hot towels to soothe her afterward. It was pretty full-on stuff.”

Ian FlemingGetty Images

Since it’s cable, the full-on stuff is, well, full-on.

“Fleming” makes it clear that his twisted history with women had deep roots in his abusive relationship with his mother, Evelyn St. Croix Fleming, played by Lesley Manville. Mummy preferred her elder son Peter to Ian.

“Fleming was tormented and he was relentless in his pursuit of sex. He would go to parties and proposition every single woman in the room,” Whitecross says. “He was even kicked out of the army when he was very young for gonorrhea, so he was with a woman every night. And it is all real.”

Whitecross, Cooper and Pulver have flown into Los Angeles from London to meet with American TV critics. It is late Saturday afternoon — teatime for the Brits — when we meet. And as we speak they sip English breakfast tea out of bone- china cups and snack on delicate cucumber-and-salmon sandwiches.

“I understand James Bond much better now,” says Pulver. “When Sean Connery grabs a woman in front of him as a defense against bullets you understand why. Women were disposable to Fleming.”

Cooper says he knew nothing of the man who later became a spy for the British navy, only of his literary accomplishments. “I am so surprised we didn’t know more about him,” he admits. “It’s sort of embarrassing.”

Fleming wrote his first Bond book, “Casino Royale,” in 1952. He died in 1964, just two years after the first Bond film, “Dr. No,” was released in theaters.

Fleming’s novel “Casino Royal” along with “Diamonds are Forever” and “Goldfinger” were reissued in 2003.

“He was a pretty dark man,” Cooper adds. “I don’t think he was ever happy with the heights he reached as a writer. We play him as a young man, so he’s still got prospects.”

The miniseries depicts Fleming’s personal demons against the backdrop of his achievements as a spy. In 1939 Fleming was recruited by Rear Admiral John Godfrey, Director of Naval Intelligence of the Royal Navy, as his personal assistant. He was later promoted to commander, carrying out secret missions with the code name 17F.

Since the sex scenes were so red-hot, the war scenes required more than the usual vigor. And in some moments, sex and war merge, as when Fleming gropes Ann in a room at London’s Dorchester Hotel while the Germans bomb it.

That scene, by the way, proved to be as dangerous as it was enticing.

“It was so powerful it was literally like a bomb exploded,” says Pulver, who, with Cooper, was thrown across the room. “They tried to play it safe with the right amount of blast, but there was dust and debris all over.” Adds Whitecross: “I wanted to combine the decadent world of the upper class and the explosive world of modern warfare. I had this idea of them being trapped inside of it.”

We also see Fleming as a budding novelist in a scene that takes place in 1942. Here, he meets William Donovan, US Intelligence Coordinator, who tasks him with writing a position paper for the Americans’ allies on something President Roosevelt calls his new Central Intelligence Agency. “Write me a blueprint for this CIA,” says Donovan. After reading it, he tells Fleming, “You are in the wrong line of work; this is a real page-turner.”

And, indeed, it is as a writer that Ian Fleming does not disappoint.

Generations of filmgoers, Cooper included, have followed Bond in his various incarnations — from Connery to Pierce Brosnan and Daniel Craig.

“I loved the Bond films so I auditioned for the role,” says Cooper, part of the new wave of actors who film themselves at home. “I put a camera on top of a pile of books and acted. But then I had some of my friends come round and read the scenes with me.”

In the final moments of “Fleming,” Ian tells his brother he wants to write a novel about a hero, a brute who always gets the girl, but he’s not sure what to call him — Aiken or Bond?

Bond, it is. James Bond.

As the actors leave the table and head down the hall to an elevator, I stop Cooper.