It sounds like you're describing exactly the series finale of LOST, doesn't it?
I wouldn't know. I, err, lost interest in that show fairly early in season 2, when it became clear that they were systematically reversing all the interesting character growth of the first season, abandoning the cast's journeys of redemption and regressing them to their old behaviors and sticking them in permanent holding patterns, because the show was more successful than they expected and so they wanted to drag things out as long as possible. (Also when it became clear that Harold Perrineau wasn't likely to stop yelling "WAAAAAAAAALLLLLT!!!" anytime soon.) I think I dropped back in for part of the third season, but it didn't hold my interest for long.
I liked the way Nowhere Man started out but it never really defined the motivations of the central villain. Their conspiracy seemed to be this. Take some guy. Erase his memory and implant fake memories. Convince him that he was a photographer whose identity was erased to cover up a photograph of some execution in South America. Program his fake memories to self-erase after a set period of time. Have a bunch of random agents pretend to be his friend every so often. Gain absolutely nothing from it but lose several of your best men. Repeat.
But that's the retcon introduced in the finale -- that his whole identity had been fake from the beginning rather than erased. And that just didn't make any sense in the context of the rest of the season. It was a bad reveal because it made things even dumber than they'd been before.
I think Nowhere Man is proof that some stories work better as self-contained tales rather than ongoing series. It would've been excellent as a movie or miniseries, but it just wasn't a concept that could sustain a weekly, open-ended episodic format. Heck, even The Prisoner only ran 17 episodes, and 10 of those were padding.