The executive branch is so-named because its purpose is to execute the law. The President has sworn an oath to do so, and to uphold the ideals of the Constitution, as the chief of the executive branch.
A President who fulfills his oath has no need to fire a person hired to investigate his own conduct and so will not. The question is moot. A President who does not fulfill his oath is just some dude, not the President, because he has chosen to abdicate his powers by failing to perform as he had sworn. He’s not the President and so, again, the question is moot.
The President can fire anyone in the executive branch. But he can fire no one, whether it’s the special counsel or the janitor, for corrupt purposes.
Obviously, the reality may play out differently than that, but that is the theory.