Dom (Jude Law, left) is best when he’s being bad, and his friend Dickie (Richard E. Grant) watches with disapproval and admiration. (Nick Wall)

The title character of “Dom Hemingway” is a Cockney safecracker, played with Rabelaisian gusto by Jude Law. His performance — which starts at 11 and stays there — may well go down in history as one of the most colorful low-lifes ever committed to film.

It is doubtful that the movie itself will be so fondly remembered.

The story opens with a bang, as we watch Dom, in prison, being sexually serviced by a fellow inmate. Addressing the audience, Law proceeds to deliver a long monologue — the subject of which is the body part just off camera — that is so simultaneously foul-mouthed and silver-tongued that it beggars description. By turns Shakespearean and surreal, it’s a funny and filthy tour de force.

But it also serves a preemptive purpose. By getting that scene out of the way early, the film removes all doubt that the man we are about to spend the next 90 minutes with — whose very name suggests a pedigree both boorish and literary — is equal parts poet and lug nut.

Whether he’s likable is another matter.

In truth, it’s kind of hard to hate the guy, despite his grotesqueness. Mostly, that’s thanks to Law, whose good looks and charm go a long way to seduce us. “What can I say?” says Dom, in a thick accent made more impenetrable by the ­ever-present cigarette hanging from his lip, “I’m a handsome [expletive].”

That’s certainly true. But Dom also makes for a wildly entertaining tour guide to the trouble that seems to follow him like a cloud. Although things initially are looking up for him, particularly after that amazing first scene, they quickly take a nose dive. Sure, he’s released from prison — whereupon he’s rewarded with a pile of cash by the mobster he took the fall for (Demian Bichir) — but then, almost immediately, he’s in a horrific car accident.

The money is stolen, he can barely walk and the daughter he abandoned 12 years ago when he was sent to prison (Emilia Clarke) wisely wants nothing to do with her father’s attempt at a reconciliation.

Making matters worse is the fact that the son of a former rival (Jumayn Hunter) wants to castrate Dom for killing his cat when he was little. “Misfortune befell me” is how Dom, in a fit of rare understatement, explains his propensity for screwing up. Note: It’s never, ever his fault.

If all this seems a bit precious, it is. Dom’s best friend, Dickie (Richard E. Grant), is a waggish toff with a prosthetic hand and yellow-tinted aviator shades. Observing everything with a sense of detached disapproval mixed with secret admiration, Dickie is a stand-in for us. But the character feels less human than an example of screenwriting artifice. Another character (Kerry Condon), whose life Dom saves in a lapse of unselfishness, pops up late in the film like an angel, delivering just the dose of luck that Dom — as well as “Dom Hemingway” — needs.

Though writer-director Richard Shepard (“The Matador”) knows how to spin a yarn about the vicissitudes of fate, Dom’s adventures make for a pretty thin garment in which to cloth such an outsize antihero. Shepard tries to add heft to the lightweight tale by introducing a thread about Dom trying to repair his relationship with his daughter. Rather than humanizing him, however, Dom’s efforts to play Daddy — and to convince us that he has a heart — feel dictated by market research, not character.

You may find yourself watching these exertions with more impatience than skepticism. The good Dom may be necessary, from a story point of view. But the bad one is more fun.

★ ★ ½ R. At area theaters. Contains violence, drug use, sex, nudity and copious vulgarity. 93 minutes.