Corrupt cops are a staple of the cinematic and literary worlds, and the best works that center on them in each form all have something special to offer. On the page one need only think of Jim Thompson’s masterpieces, “The Killer Inside Me” (filmed twice, the second time just last year) and “Pop. 1280” (adapted by Bertrand Tavernier in 1981 as “Coup de Tourchon”). And on screen there are examples ranging from Nicholas Ray’s “On Dangerous Ground” (1951) and Orson Welles’ “Touch of Evil” (1958) to Werner Herzog’s “Bad Lieutenant” (2009—a vast improvement on Abel Ferrara’s 1992 original), each in its way an exercise in directorial virtuosity that takes the familiar template to a new and rarefied level. One could cite plenty of other examples.

It might be hoped that “Rampart” would join such exalted company. After all, it represents a reunion of director Oren Moverman and actors Woody Harrelson and Ben Foster, who worked together on last year’s moving “The Messenger.” And it’s co-scripted by James Ellroy, whose novel was the basis for yet another classic of police malfeasance, “L.A. Confidential” (1997). But the magic escapes them this time around. The film is certainly a tour de force for Harrelson, whose performance is very different from those of Robert Ryan (in “Ground”) and Nicolas Cage (in “Lieutenant”) but almost as compelling. But it’s also a dour, depressing character study that doesn’t so much develop and expand as simply repeat the same points over and over again, to diminishing effect.

Harrelson plays Dave Brown, a veteran cop in the Los Angeles of 1999, when the department is being buffered by a scandal involving widespread police brutality. He’s a smart-ass, cocky, quick-tempered, verbally abusive fellow who can smile while delivering a contemptuous remark to a rookie or a lawyer, a come-on to a lady in a bar, or a punch—sometimes with a billy club—to a low-life on the street. He lives in an unusual arrangement with his two ex-wives (Anne Heche and Cythia Nixon), who are also sisters, as well as the daughters he had with each of them. But when off duty he eagerly seeks out other female conquests in bars, like a tremulous lawyer (Robin Wright).

Brown’s propensity for violence—we see him beating a suspect for information, and there’s repeated reference to a long-ago incident in which he killed a suspected serial rapist—has already brought him official scrutiny from an assistant DA (Sigourney Weaver), with whom he matches wits during interrogation. But when he delivers a beating to a motorist who’s crashed into his patrol car, and a video of the incident becomes a staple on the news—making him the face of the brutality with which the entire force has been tarred—the pressure on him to resign becomes really intense. Brown thrusts and parries as he’s quizzed by unhappy superiors and a hard-nosed investigator (Ice Cube), and hopes that help from his old buddy, an avuncular retired cop (Ned Beatty) will get him off the hook. But inevitably he sinks further and further into the morass.

Harrelson works overtime to keep Brown interesting through his inevitable decline and fall, but inevitably his performance comes to feel a one-note turn delivered at very high pitch. Moverman is also toiling feverishly, channeling with cinematographer Bobby Bukowski the gritty mood of American pictures of the seventies to keep things raw. The supporting cast deliver what’s asked of them, though sometimes overdoing it (Beatty); the best of the lot is Weaver, who’s sharp as Brown’s chief inquisitor. Foster, meanwhile, is so covered in makeup in a cameo bit as Brown’s informant that you might end the screening wondering whom he played.

One can admire the way that “Rampart” strives to capture the atmosphere of corruption that prevailed in the LAPD during the late nineties by concentrating on a single representative officer. But in the final analysis despite the joint efforts of Moverman, Ellroy and Harrelson the film fails to ignite, remaining a character study that hectors more than it enlightens.