In Ratatouille Anton Ego writes reviews about the food he was served at the restaurant. He didn't mention rats anywhere in his review, so why did he lose his reputation when rats were found in the kitchen?
This is not really explicitly explained in the film (it's only briefly mentioned), but implicitly:
Anton Ego is a famous critic known for scathing reviews and an extremely finicky taste. When Linguini holds a press conference, Ego arrives and announces in front of the reporters that he'll be reviewing Linguini's restaurant - so this review is highly publicized and anticipated. Then, surprisingly, not only is his review not scathing, but he also calls the restaurant's chef the finest chef in France. And soon after the review is published, it turns out that the kitchen was infested with rats. So it would appear that Ego clearly dropped the ball, and if the publication he works for is as finicky as him, it's not that far-fetched that he'll be fired over such a well-publicized blunder.
[Also bear in mind that his experience with Remy was a real eye-opener and changed his beliefs. Since the film doesn't specify when Ego lost his job and reputation, it's possible he continued to write reviews that were significantly mellower (since he now also believed in Chef Gusteau's notion that 'anyone can cook'), and that his fanbase was disappointed and simply stopped reading them.]