After Pharaoh admits his guilt and begs for relief from the devastating swarm of locusts, Moses simply turns away from the Egyptian ruler to seek God's intervention. In a stark departure from his behavior during previous plagues, such as the frogs, wild beasts, and hail, Moses leaves the palace without offering Pharaoh a single word in response [ביאור יש״ר, קאסוטו]. This profound silence stems partly from the nature of Pharaoh's statement, which was merely a confession and a plea that did not strictly require an answer [קאסוטו]. Beyond that, Moses was already well aware that God had hardened Pharaoh's heart. He understood that the Egyptian king would maintain his rebellion and refuse to release the people until the final plague of the firstborn was complete. Knowing this, Moses chose not to honor the king with a reply [ביאור יש״ר, העמק דבר].
As Moses departs from the palace, he likely follows his usual practice of leaving the city limits to distance himself from Egyptian idolatry before praying, even though this detail is assumed rather than explicitly noted in the narrative [ברכת אשר על התורה]. Interestingly, the account leaves Moses unnamed as he steps away. This anonymity reflects the very nature of the locust swarm, which famously operates without a king. Because Moses is likened to a royal figure, his identity is deliberately muted in the context of a plague characterized by its lack of a leader [מנחת שי].
Once outside, Moses begins to passionately entreat God to remove the plague [ביאור שטיינזלץ]. This intense level of pleading is necessary because Moses had not actually promised Pharaoh that he would pray on his behalf, requiring him to make a special, dedicated request to God. Moses fulfills the king's plea and prays, even though he knows perfectly well that Pharaoh's promises are entirely empty at this stage [העמק דבר]. In response to his sincere prayer, God accepts the request and clears the locusts from the land [קאסוטו].