The Departed
You can always rely on Martin Scorsese for an ending that will keep you at the edge of your seat. In the final moments of The Departed, Colin Sullivan (Matt Damon) is gunned down in his own home by Sgt. Dignam (Mark Wahlberg). Sullivan's cover had been blown by Billy Costigan (Leonardo DiCaprio) shortly before the incident, so it makes sense that Dignam would be ready to take him out.