Kill off problem characters.
Best Example: The O.C.
Sometimes the source of a series' woes is a single character, a main cast member who has become dead weight personified. By its third season, The O.C. had gone from being the "it" show to a shit show, trading in the fun soapy universe provided by the affluent California setting for pure, gloomy melodrama.
The entire cast was saddled with lame plots, but the epicenter of it all was without a doubt Marissa Cooper (Mischa Barton), whose misfortune and woes were increasing at a weekly rate. To recap: She gets kicked out of school, her dad leaves town and blows the family up on his way out (again), strikes up a friendship with possibly the lamest recurring characters the series has ever seen at her new school, and shacks up with Volchok, a dirty surfer guy who exposes her to assorted drugs.
That's to say nothing of her tepid on-off relationship with Ryan, and the half-hearted love triangle between the two of them and another, less dirty surfer guy who gets drunk and falls off of a cliff to his death when she ultimately rejects him. The worst part is, we probably left something out.
At some point during the season, the writers identified Marissa's rock-bottom misadventures as the problem, and set her up to leave town in the finale after the gang graduates from high school. Only, to make sure she could never come back and overdose on pills in Tijuana or attract the attention of some crazy simp again, they took it a step further and knocked her off on her way out of town, by way of vehicular manslaughter by Volchok.
Mischa Barton didn't take the firing well, but her death ended up being the cleanse the show needed to rejuvenate itself, leaving her far more interesting younger sister in her wake and bumping Autumn Reeser's neurotic, sexy Taylor up to main cast member and Ryan's new love interest. Lo and behold, after a few necessary episodes of dealing with her death, The O.C. was fun again. Too bad by then most viewers had jumped ship, making the fourth season the final as well.