The news that Michael Bay, the grinning schlockmeister behind the “Transformers” franchise, “Armageddon,” and “Pearl Harbor,” was directing a special-effects-free comedy actually piqued some people’s interest, this critic’s included. Who knows, we thought: Maybe the guy would turn out to be good at something besides making ridiculous amounts of money.

No such luck. “Pain & Gain,” a jokey but fatally tone-deaf true-crime caper, plays like “Fargo” for idiots. It’s final proof, if you need it, that Bay is a director of great mechanical skill and no discernible talent, which means that he can pull off a camera shot or an action sequence to make you gasp but is hapless at making a movie that holds together for more than five minutes at a time, let alone from one end to the other.

“Pain & Gain” is based on the misadventures of a trio of Miami bodybuilders named Daniel Lugo (Mark Wahlberg), Paul Doyle (Dwayne “The Rock” Johnson), and Adrian Doorbal (Anthony Mackie), who — as reported in a late-1990s series of articles for Miami’s New Times on which the script by Christopher Markus and Stephen McFeely is based — kidnapped and tortured a local business magnate so he would sign over his assets to them.

Somewhat amazingly — and despite the trio’s bungled attempts to murder their victim — this scam succeeded, only falling apart when they tried to repeat the trick on another high-roller and his girlfriend who did, in fact, end up dead and dismembered in a couple of oil drums at the bottom of a swamp. Are you laughing yet?

The script, which is reasonably clever, tries to pitch this as a dark farce about the American dream gone stupid. Wahlberg’s Lugo is the putative mastermind, a pumped-up personal trainer who buys into the slick self-help jive of a local motivational guru (Ken Jeong) and decides to be a “do-er” rather than a “don’t-er.” He recruits the steroid-addled Doorbal and the sweetly dim Doyle, a born-again ex-con, to help shake down Victor Kershaw (Tony Shalhoub), a foulmouthed deli king.

Here’s a problem that a lot of movies “based on true stories” run into: They think they’re excused from making their stories believable in movie terms. “Pain & Gain” is far-fetched enough without introducing a Romanian stripper (Bar Paly), who thinks the boys are CIA agents, or sending the heroes back to Home Depot to replace a chainsaw with human hair stuck in its teeth. The larger problem is that Bay jumps awkwardly from scene to scene and attitude to attitude — the editing is shockingly clumsy — without any overarching idea of what his movie’s about.

Is “Pain & Gain” a satire of the American dream? A comically brutal crime comedy? A Florida freak show? It’s never clear, so we’re never clear how to take it. Bay is unable to establish a comic rhythm or a larger momentum, and by the second hour of the unnecessary two-hour running time, the movie has turned hectic and intensely unpleasant, with characters grilling severed human hands on a backyard barbecue and Wahlberg’s shaggy likability long gone in the Miami breeze. What can you say about a movie where The Rock gives the most subtle and sympathetic performance? Just that Bay might be better off sticking with two-dimensional action heroes and snap-together robots, rather than going for human characters and dilemmas.

Late in the going, “Pain & Gain” brings in Ed Harris as Ed Du Bois, the private detective who brought Lugo and company down; he has a few scenes with Emily Rutherford as his wife that are virtual clones of the domestic moments between policewoman Marge Gunderson and her husband in “Fargo.” The difference is that the Coen brothers held us expertly in a spot between ironic laughter and appalled fascination. Bay just rubs our nose in mayhem and giggles at the mess he’s made.