Season 7, Episode 17
When Smithers inadventantly makes Mr. Burns feel inadequate, his boss demands he take a vacation and leave a replacement while he is away. So Homer fills the gap in the meantime, and ultimately does a better job. When Smithers returns he finds is no longer needed and promptly fired.
See here for more details.
Notes & Screenshots: Lord Heath