In Parshat Chukat (Bamidbar 20:7-8), God asked Moshe to speak to the rock so that it may bring forth water. However, Moshe hit the rock instead of speaking to it. In verse 12, God said to Moshe and Aharon, “Because you did not believe in Me to sanctify Me in the presence of B’nai Yisrael; therefore, you will not bring this congregation into the land that I have given them.”
This is a heartbreaking moment for Moshe whose mission was to bring B’nai Yisrael into the Land of Israel. However, Moshe does not slow down. Immediately after this incident (Mei Meriva, Waters of Dispute) Moshe forges on. As we read in verse 14, “Moshe sent emissaries from Kadesh to the King of Edom…”
The Midrash, Bamidbar Raba states:
When a person is slighted by their business partner, he wishes to have nothing to do with them; whereas Moshe, though he was punished on account of Israel, as it is stated: “They angered him at the waters of Meriva, and it went ill with Moshe because of them”, did not rid himself of their burden but: “sent messengers.”
According to Nehama Leibowitz, the Torah mentions that the messengers were sent while B’nai Yisrael were still in Kadesh to emphasize Moshe’s adherence to his mission of bringing the people to the Land , even after his rebuff, in spite of the fact that he had been explicitly excluded from it. And when his first deputation failed, he sent messengers a second time.
It is clear from here that not only did Moshe not give up on his job, he put more than 100% effort into continuing his mission. Even after the King of Edom refused to let them through, he continued to try to negotiate with him.
Moshe felt that his assignment to make sure that B’nai Yisrael would arrive in the Land of Israel was not complete and he continued to work on getting them there until the last day of his life.
In Parhat Chukat, both Miriam, Moshe’s sister and Aharon, Moshe’s brother pass away. The fact that Moshe continued to live may have been a push for him to try to accomplish as much as possible during his lifetime.