But Pharaoh wasn’t the only reprehensible individual to have his free will rescinded because of earlier sins. G-d hardened King Sichon of Cheshbon’s heart for much the same reason — and not because he “was not willing to let us pass through his land” (Deuteronomy 2:30) when we needed to.
For at a certain point we “sent messengers … to King Sichon” from the Sinai Desert with the following message: “Let us pass through your country” on our way to the Land of Israel. “We will not turn aside into any field or vineyard, or drink water from any well”, so there’d be no reason to be concerned for theft or property damage. We assured him that we would only “travel along the king’s highway” — the main road — “until we will have passed through”.
But Sichon’s heart hardened (that is, G-d withheld his ability to choose to do good at that point), and Sichon then “mustered his entire army and marched out into the desert against Israel” (Numbers 21:21-23). Rambam avers that “Sichon was punished” for what he did, though it was through G-d’s intercedence, “for some earlier wrongdoing or injustice in his kingdom”.
In case you think that G-d only set that phenomenon in motion when it came to ruthless potentates, know that there were other instances of it as well. The prophet Isaiah was told, for example, to “fatten the heart of (the Jewish people), make their ears heavy… lest they… repent and be healed” (Isaiah 6:10), which means to say that Isaiah was to arrange for their free will to be denied them. (Rambam offers other instances in which G-d denied our people the freedom to choose, including 1 Kings 18:37 and Hosea 4:17; but also see what he says about Isaiah 63:17 and Malachi 2:17).
In the end the point is “obedience or disobedience is indeed in one’s own hands”, as we’re truly free to make our own ethical choices, “and that one chooses his own actions.” For “we do what we want to do, and can in fact not do what we don’t want to do” unless “G-d punished us for a sin we’d committed by withholding our free will” as was explained.
Rambam ends this section by adding the following truism: “Since acquiring virtues or flaws is in your own hands, it’s imperative and important for you to bestir yourself to try to acquire virtues” rather than faults. “For no one other than yourself can ever inspire you to”, and no one other than you will have to answer for your actions in the end.