Fracture
(2007)

Short version:
Crawford is acquitted of attempted murder, but after he pulls the plug on his wife, Beacham finds more evidence and can use it by charging him with murder, a new charge with no double jeopardy protection.

Longer version:
Ted Crawford (Anthony Hopkins) walks on the attempted murder of his wife when his confession is thrown out. Det. Dunally (Billy Burke) commits suicide due to this. Ted pulls the plug on his wife, finally killing her, despite Willie Beachum (Ryan Gosling) racing at the last second with a court order to stop it. Willie realizes the gun recovered was no good because Ted stole Dunally's gun at the hotel and switched it with his own. Ted committed the crime with Dunally's then switched them back when Dunally came as the hostage negotiator. Ted, defiant, thinks he cannot be charged again, gleefully talks about how he did it to Willie. But Willie lets him know that due to his pride about his wife's infedility he WILL be under arrest again.

Because, Ted pulled the plug on his wife, thus killing her, and since he perpretated the original crime, he will be charged with MURDER ONE, which is a completely different realm and not subject of the double jeapoardy law Ted thinks he is protected by. Just before the cops come to arrest Ted again, Willie calls him out on his "fracture"- since Ted could not let go of his wife's betrayal he actually hung himself all over again with no plan in place (if Ted had let her stay in a comatose state he would of been safe and able to leave the country).

The movie ends at the new trial, Ted now represented by a team of lawyers,and Willie at the prosecution, ready to put him away. We do not find out if Ted is convicted, but is safe to say with the new evidence, all of Ted's head games and money will not be able to save him. It is unknown if Willie stays as a D.A. or tries again for a job at Winston Soot. It is also unkown if he ended his relationship with Nikki Garderner (Rosamund Pike) or not.

 Thanks Spectre and Edgeman!