1. The Office
In the year after the departure of Steve Carrell, The Office floundered HARD. Replacing Michael Scott with Andy Bernard was a move that pleased no one, the show creatively went off the rails, and pretty much every character became sort've unlikable.
Which makes it all the more miraculous that the show rebounded pretty well in its final season - getting rid of the weird new bosses and focusing back on the characters and what made them compelling (and includes perhaps the best Jim prank the show ever had - Asian Jim). And the show even managed to weave in the perennial complaint ("WHAT DOCUMENTARY CREW WOULD FILM A PAPER SUPPLY SALES OFFICE FOR 9 YEARS?!") into the season's overall narrative and heavily into the actual finale.
And that finale ended up being sweet ("Gutenprank!"), funny, and an amazing reminder of why the show got so popular in the first place. It's so good, that I can even recommend watching the table read of the episode, which is surprisingly emotional and wonderful in its own right:
Okay, technically Futurama had, like, 4 or 5 finales. The original ("The Devil's Hands Are Idle Playthings") is basically perfect - sweet and nice and funny and a great encapsulation of what the show was during its original run. It implies a lot without having to commit to exploring the Fry/Leela relationship too much, as the show would do in later seasons, to varying degrees of success.
And in the ACTUAL series finale ("Meanwhile") pulls off what the show could originally only imply, and it does it extremely well. Hell, it almost seems like they saw that first finale as a challenge - instead of just wink that Fry and Leela have a future together, why not dive into it as fully as possible?
Sticking with the show's tendency to toy around with legitimate sci-fi ideas and tropes, Fry and Leela inadvertently freeze time for the entire world...except themselves. Fry and Leela get married, and lovingly wander the frozen Earth together for decades. And once their journey is at an end, they're able to reverse the time-stoppage, and plan to start over again together. It's corny, but sweet as hell, and is a fitting end (that we can all agree works so please stop bringing this show back from the dead every few years, c'mon).
3. Buffy the Vampire Slayer
Buffy's last season (assuming you don't include the comics, which you probably shouldn't even though they're pretty fun) was...pretty divisive. From the bizarre nature of the Ubervamps (where initially a single one was an unkillable monster to Buffy being able to take on multiple ones with ease), goofy bits about The First Evil, sidelining of a lot of key characters to make way for new ones, and Willow hookin' up with a non-Tara character, there was plenty to grumble about. But all was forgiven in the wonderful finale, which was marked by so many highs that its shortcomings could be easily brushed aside - the empowering final sequence where Buffy and Willow activated all potential slayers (including one HELLA impressive baseball player), Giles' hilarious revelation that there was another Hellmouth in Cleveland, Willow's turn to the light, and the utter and complete destruction of Sunnyvale made for a solid ending.
Of course, then they spoiled that ending by making some canonical further seasons in comic form, but we can just ignore Buffy and Angel having supersex in the sky, okay?
Hey! Speaking of Angel, that Angel finale, right? The perfect mix of finality, tragedy, and an understanding that the adventures would continue, whether there was a show or not. More than any other finale, it left you wanting more - and that's the perfect way for any show to go out. (although JESUS CHRIST Joss Whedon, could you have NOT done all that shit to Fred and Wesley?)
5. The Shield
The finale of The Shield is probably the most perfect finale of any show ever - and that's saying a lot, because I can't think of another show (outside of maybe Breaking Bad) where the tension was continuously ratcheted up season by season until it hit its absolute breaking point. Vic Mackey had been barely escaping the grip of the law catching onto his crooked cop ways for 7 increasingly-desperate years - and the finale shows Vic finally getting away with everything...but at the cost of everything he holds dear. He's able to get immunity for himself, but his partner Ronnie is left to suffer the fate that Vic deserved in prison. His family abandons him, he loses the respect of everyone around him, and he's directly responsible for the tragic murder-suicide of his ex-partner Shane Vendrell and his family. The destruction wrought by Vic Mackey's selfish pursuits is enormous and horrifying. But Vic, stripped of all of his authority and power, cannot be stopped - he hears a siren in the distance, so he grabs his gun and heads out. We don't know what happens - but we know what we suspected all along - the only thing that could stop Vic Mackey is death itself.