In Ben Affleck’s new crime drama, he plays a 1920s mobster with a fatal flaw: He’s a softie. Affleck himself has an equally tragic one: He views himself as his best possible leading man, which he isn’t. At least, not in this film.

Working with another Dennis Lehane novel (his first was 2007’s “Gone Baby Gone”), screenwriter-director Affleck moves back to the Prohibition era to tell the story of Joe Coughlin (Affleck), a WWI soldier-turned-Boston bank robber-turned-rum-running Florida gangster. Along the way, he tussles with the Irish mob, the Italian mob, the KKK and a fiery young evangelical preacher (Elle Fanning). It’s a sprawling plot that consistently teeters on the edge of unwieldiness, but Affleck’s assured directing, gorgeous cinematography by Robert Richardson and a who’s-who of Hollywood’s best character actors keep it mostly on track.

He’s joined in the first act by Sienna Miller as Joe’s brassy love interest Emma Gould, mistress of the Irish mob boss (Robert Glenister). When their affair goes south, so does Joe: Italian boss Maso Pescatore (Remo Girone) sends him to Ybor City — “the Harlem of Tampa,” as his right-hand man Dion (Chris Messina) puts it — to set up a bootlegging operation.

Despite Joe’s protests against “kissing a ring” and working for someone other than himself, he’s good at the gangster thing, and uses his increasing local sway — thanks in part to a corrupt police chief (Chris Cooper) — to plan a casino. He also falls for Graciella (Zoe Saldana), a Cuban rum importer with designs on building women’s shelters. But Joe’s imperiled by a murderous racist (Matthew Maher), Pescatore’s power-hungry thug of a son (Max Casella) and that evangelical preacher — the police chief’s daughter, who moves from vice to extreme virtue.

Joe processes all these developments with scant observable emotion; it’s difficult to avoid sizing up “Live by Night” as “The Town” with a classier wardrobe but less heart. Affleck clearly relishes playing the good-guy criminal, but his low-affect style doesn’t work as well here, unless Joe’s roller-coaster morality is a highly subtle demonstration of postwar PTSD. My theory is simpler: When you’re calling all the shots, there’s likely no one to tell you you’ve miscast yourself.