Basic Instinct 2
(2006)

Neither Catherine Tramell (Sharon Stone) nor the dirty cop, Roy Washburn (David Thewlis), is the killer. The killer is Dr. Michael Glass (David Morrissey.)

Catherine Tramell explains it all in the end (it's also the plot of the new book she wrote.) Glass killed the journalist because he was having sex with his ex-wife (and had been having sex with her even when they were married.) He slashed his ex-wife's (Denise) throat because she was a "slut". He killed the drug dealer for some confusing reason and he shot the person he most wanted revenge on, Washburn, because he had lied about an ex-patient of Dr. Glass's behavior which had led Dr. Glass to face ethical questioning and subsequently have a nervous breakdown.

Glass is found to not be mentally fit enough to stand trial for all the murders and the movie ends with him in a mental hospital. 

Thanks, Brian!

(Links open in new window)
Read more about this film at The Internet Movie Database.