After hosting underground poker games for Tobey Maguire, Leonardo DiCaprio and Ben ­Affleck in Los Angeles, Molly Bloom looked to New York.

“When A-Rod appeared tall, handsome and very polite, the heads jerked up from the table,” Bloom writes. The Yankee encouraged Bloom to take her game to Miami, where he owned a beachfront condo.WireImage

In September 2008, the 5-foot-4, green-eyed brunette beauty booked a 4,300-square-foot suite at the Four Seasons with 360-degree views of Manhattan for her debut game. She supplied champagne and caviar and called her coterie of Playboy Playmates, models and masseuses to ­entertain and relax the men.

Yankee star Alex Rodriguez and billionaire Guy Laliberté, CEO of Cirque du Soleil, took seats at the custom poker table alongside Wall Street traders and hedge-fund giants, as Bloom prepared to host her highest-stakes game ever — with a minimum buy-in of $250,000.

A TV hummed in the background with George W. Bush reading his speech about the plummeting economy.

“What a game,” A-Rod said as he gazed at the teetering stacks of chips worth millions of dollars in the center of the table.

The billionaires and millionaires played until the sun came up. The hostess walked away with $50,000 — tips plus a percentage of the pot. Not a bad night for someone who didn’t even play a hand.

Molly Bloom ran her exclusive, top-secret, bicoastal poker ring for several years, keeping the ­details secret from even her closest friends and family — but now she’s ­finally showing her hand in her memoir, “Molly’s Game,” out Tuesday.

Bloom grew up in Loveland, Colorado, with her dad, a Colorado State University professor, mom and two brothers.

“I had grand ambitions that fell far outside my father’s pragmatism,” she writes. “But I still desperately craved his approval.”

Despite undergoing spinal surgery at age 12 for scoliosis, Bloom excelled in skiing. Shortly after going away to the University of Colorado at Boulder to study political science, she made the US Ski Team, placing third overall in the country in 1998.

While pondering law school after graduation, Bloom moved to Los Angeles, where she crashed on a pal’s couch and applied for cocktail-waitress jobs.

Bloom was leaving her first shift in Beverly Hills when she was nearly hit by a silver Mercedes-Benz. The car’s driver, a man she calls Reardon Green, offered her a job at his restaurant, Boulevard. She eventually became his assistant, helping with duties at the real-estate fund he owned and organizing a little poker game he hosted on the side for celebs at the Viper Room, the iconic nightclub in which his company had a stake.

Green handed the reins of the game over to Bloom, who was clueless about poker — not knowing the difference between a blind and a buy-in.

“I Googled things like, ‘What type of music do poker players like to listen to?’ And I made mixes for the game with embarrassingly obvious song choices: ‘The Gambler’ or ‘Night Moves,’ ” she writes.

Clad in a sweet navy-blue dress with a bow and old heels from her college days, Bloom greeted guests for her first game as they showed up at the front door at 6:45 p.m. with the $10,000 buy-in required to play.

Todd Phillips, writer and director of “Old School” and “The Hangover,” was the first one there, followed by DiCaprio and Maguire.

DiCaprio was a player from Bloom’s first game. “He had a strange style at the table,” she writes. “It was almost as if he wasn’t trying to win or lose. He folded most hands and listened to music on huge headphones.”WireImage

“When I shook Leo’s hand and he gave me a crooked smile from under his hat, my heart raced a little faster,” Bloom writes. “Tobey was cute, too, and he seemed very friendly.”

Green, who was also playing, instructed the room that they wouldn’t be invited back ­unless they tipped their hostess.

Bloom took home $3,000 that night.

She quickly learned that the key to keeping her high-profile players happy was keeping out the pros, who could easily pocket the six-figure pots, and maintaining the mystique of the game, which meant turning down players and keeping the whole thing hush-hush — not even telling her roommate what she was up to.

Bloom turned away most spectators, knowing discretion was key, but when Mary-Kate and Ashley Olsen showed up one night on the arms of a billionaire she was trying to woo into the game, she bent the rules.

Each player had his own quirks, Bloom noticed. Maguire would only play with his beloved Shuffle Master, a $17,000 machine that dealt the cards, and would charge the other players $200 to use it. He demanded a spread of vegan desserts during the games and to know whom his competition would be before each game.

At Bloom’s second game — for which she traded in her innocent duds for a sexy Dolce & Gabbana number — she invited a man she calls Mark Wideman at the request of her boss. When the heated game got down to Maguire and Wideman, Wideman called, scooping up the massive pot. The actor smiled politely, while pulling his phone out to text Bloom under the table.

“Who is this guy?” Maguire texted.

“Mark Wideman. He’s an attorney,” she wrote back, to which he ­responded with a curt, “I see.”

“The worst tipper, the biggest winner and the absolute worst loser,” Bloom writes of Maguire. She recounts a time when the actor demanded she “bark like a seal” for a poker chip. She refused.Pacific Coast News

Maguire still came out on top that night but gave the smallest tip. Bloom realized she’d need to vet new players herself to keep her celebs happy.

Bloom concentrated on booking “whales” — wealthy guys who were bad at poker but could be lured in by the chance to sit with stars. Although Maguire and ­DiCaprio were two of the most famous guys in the world, with millions to their names, they wanted the deck stacked in their favor.

It wasn’t long until Bloom took what she learned from Green and went behind his back to steal away his players and start her own game.

“If I take the game over, I told myself, I’ll clean it up. Upgrade. I imagined holding my games in beautiful rooms with snack tables outfitted with caviar and fine cheeses,” she writes. “I would hire beautiful girls to quietly serve drinks, and the city of Los Angeles would twinkle many ­stories below my poker penthouse.”

And that’s exactly what she did.

As her career began to take off, Bloom’s social life soared, too. She was dating Drew McCourt, whose father owned the Los Angeles Dodgers, upgrading to Louboutins and Bentleys and partying at Diddy’s.

Bloom registered an LLC for her “event-planning business” and met with an attorney to make sure what she was doing was aboveboard. He told her it was, so long as she profited only from tips, not the game itself.

Bloom’s first solo event was at LA’s posh Peninsula hotel, and she brought along masseuses who were made to sign nondisclosure agreements.

Bloom noticed that the expensive surroundings made the guys more willing to raise the stakes. Real-­estate broker Bob Safai squandered nearly $300,000 that night, she says, but he didn’t even seem to mind.

“I’m going to make $10 million this year on poker,” Maguire gloated after one of Bloom’s games.

“The upgraded location and the fact that every man was treated like James Bond only made the game a hotter ticket,” she writes.

Affleck liked high stakes. Asked whether he wanted to join the $10,000 or $50,000 game, he jumped on the latter. “Ben’s buy-in choice told me that he was a smart player who liked to limit his downside,” Bloom writes.AP

The next big stars to join Bloom’s game were Ben Affleck, who was referred by Maguire, and Rick Salomon, famous for appearing in the Paris Hilton sex tape.

At their first game, the buy-in rose to $50,000.

“Hey, yo, did that Jennifer Lopez’s ass have cellulite on it, or was it nice?” Salomon asked Affleck between hands.

“It was nice,” Affleck admitted. The table laughed.

Business grew, with Bloom hosting her first tournament in Vegas in 2008, and then she had a chance to move her game to the East Coast — where the Wall Street money was. Bloom began demanding a percentage of the multimillion-dollar pots — crossing the line into illegal activity.

Bloom got a luxe apartment in downtown Manhattan and recruited a bevy of beautiful women to work her games.

It paid off: Her New York games were bigger and more profitable than her LA ones had been.

When she began facing players who couldn’t pay their six-figure debts, Bloom had to play to her strengths.

“Most game runners, when they got stiffed, behaved like gangsters; they sold the debts on the streets or hired muscle and tried to manipulate people into paying or worse,” Bloom writes.

“The two most valuable assets in [my] debt collection were incentive, specifically access to beautiful girls, great games and important people, and my femininity. If I could get [a player] to view me as a woman whom he could save by simply paying his debt, I had a much better chance of collecting.”

So when her driver introduced her to two massive guys offering to be her muscle in 2010, Bloom declined. But they wouldn’t take no for an answer.

“I opened the door to a stranger. He stepped forward forcefully into the entryway,” Bloom writes. “Before I could protest, he pushed me back and came into my apartment . . . I opened my mouth to scream, and he pulled out a gun from under his jacket and slammed me back against the wall.”

Bloom leaves federal court in December after pleading guilty to illegal gambling. The Poker Princess was sentenced to one year of probation earlier this year.AP

Bloom pleaded with the man, told her where she kept her cash, but he continued to punch her in the face — interested in revenge, not money.

As blood spilled from her nose, the man ordered Bloom, “Don’t disrespect us again.” He threatened to go after her family if she called the police.

Things went from bad to worse after the attack, as one of her players was indicted by the government for running a Ponzi scheme. Bloom had to testify against hedge-fund manager Brad Ruderman, who was apparently using her games to find investors in his business.

Months later, Bloom was heading to one of her games when a player texted her that the feds had crashed it looking for her. Bloom fled to Colorado, where she refused to talk to investigators, which resulted in her assets ­being frozen.

The former high roller lived a quiet life in Colorado until two years later, in 2013, when she moved back to LA and shortly after got a knock on her door from the FBI.

She was charged, along with 30 others, with participating in two Russian-American organized-crime enterprises engaged in gambling and money laundering. (She says she had no idea about her players’ illicit dealings.)