In charge of a movie for the first time, Aaron Sorkin shows in the hard-driving legal thriller/personality profile “Molly’s Game” that, as a director, he’s a great screenwriter.

Sorkin tells the true story of Molly Bloom, played with incisive wit and fierce power by Jessica Chastain. Bloom had a promising career as a pro skier, an Olympic berth in her grasp, when she was injured in a freak accident on the moguls. She worked office jobs in Los Angeles after that, until one day her obnoxious boss (Jeremy Strong) recruited her to run his high-stakes poker game.

The game is where movie moguls, tech millionaires and other young rich men (it’s almost all men) gather to experience the high of betting large sums of money and outwitting their fellow young rich men. Mostly, it’s the chance to go up against a cutthroat movie star, identified by Molly only as Player X (and portrayed by Michael Cera).

Molly makes a lot of money in tips, but soon realizes she can make a lot more by cutting out her boss and running her own game, with Player X as the lure. Her new game is wildly popular for a while, but she soon learns a hard lesson in trusting her fate to capricious men.

Most of “Molly’s Game” focuses on Molly’s dealings with men. Most of them are the ones at her game, like the good ol’ boy (Bill Camp) who loses his cool at the table or the nice-guy executive (Brian d’Arcy James) who’s terrible at poker but loves the camaraderie. Then there are the mysterious Russians, whose shady dealings attract the attention of the FBI — forcing Molly to seek out a good lawyer, the skeptical, razor-sharp Charley Jaffey (Idris Elba).

But the one man in Molly’s life, the one to whom Sorkin returns constantly to goose the drama, is her father, played by Kevin Costner. He was also her ski coach, a demanding taskmaster whose uncompromising view of winning now runs bone-deep in his daughter.

Sorkin’s script, based on Bloom’s not-quite-tell-all memoir, tells Molly’s story in her own voice — with Chastain narrating in dense chunks of voice-over. Being a Sorkin movie, there’s a lot of talking, though with less of the walking-and-talking that was his trademark on “The West Wing” and other projects.

Chastain gives a powerhouse performance as Molly, as she shifts her tools of choice from ski poles to stilettos and makes an impression in both. Chastain’s Molly holds her own against condescending poker players, bullying mobsters, intimidating feds and Costner’s gruff earnestness — and does it with elegance and grit.

What I wouldn’t give, though, for another set of eyes to read Sorkin’s script and say, “Dude, trim it back a little.” Sorkin the director is so enamored of Sorkin the writer’s words that he is loath to part with a participle. “Molly’s Game” is often as riveting as a high-roller’s poker game — but like the game, Sorkin would have been better off folding a bit sooner.

★★★

Molly’s Game

Jessica Chastain’s firecracker performance enlivens a talky script by writer and first-time director Aaron Sorkin.

Where • Area theaters.

When • Opens Monday, Dec. 25.

Rating • R for language, drug content and some violence.

Running time • 140 minutes.