That happened to John Sculley in 1993 when he was CEO of Apple Computer. He wanted to resign but the board of directors talked him out of it. And then the board of directors fired him.
What f*(ks me up is if you plan to quit a job your manager will try to guilt trip you about how it'll "affect the team". But if the higher ups decide to lay you off tomorrow all of a sudden; that oh so special "team dynamic" isn't even a factor.