The Bad Lieutenant:
Port of Call - New Orleans

The movie opens during Hurricane Katrina, when Officer Terence McDonagh (Nicolas Cage) rescues an inmate from the local jail while its flooded, but injures his back during the rescue. Cut ahead six months and McDonagh is promoted to lieutenant and put in charge of the murder investigation of a small time drug dealer and the dealer's family.

Unfortunately, McDonagh is as the name implies, a bad lieutenant. He dates a drugged out prostitute Frankie Donnenfeld (Eva Mendes), is constantly high on drugs, and stealing drugs from people he arrests, he ows a small fortune to the local bookies, and uses torture on innocent senior citizens to get info he needs on the crime. Once he is demoted during an investigation into allegations of his misdeeds, he even agrees to work as an inside man for the murderer/drug king Big Fate (Xzibit). The movie is full of McDonagh's psychadelic hallucinations. However, McDonogh ends up planting evidence on Big Fate that leads to his arrest, and all of his other problems end up working out for the best (through his own doings or through luck).

In the end, McDonagh is promoted to captain of the police force, and it turns out that Frankie has left prostitution, has kicked her drug habit and is pregnant with McDonagh's child. However, we find that McDonagh himself is still up to his old bad habits and he ends up strung out in a hotel room after stealing the drugs from a young couple.  Then, McDonagh is found in the hotel room by the prisoner from the beginning of the film who is now employed by the hotel and living a clean life. The former inmate promises to help McDonagh through his problems. It is unclear if the entire movie consisted of real events or was a hallucination of McDonagh.

Thanks Evan!