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.
Planet of the Apes
Planet of the Apes features one of the most iconic endings in cinema history. A group of astronauts awakens from deep hibernation after a space voyage, and their spaceship crashes into a lake on an alien planet. At the end of the film, as Taylor and the formerly-captive Nova follow the shoreline on horseback, they discover the remains of the Statue of Liberty—meaning that the "alien" planet upon which the astronauts crash-landed was actually Earth after a nuclear war.