We saw in Parshat Shemot that Moshe was told by Hashem to go to Paroh and perform several plagues to force Paroh to let the B'nai Yisrael out of Egypt. In 4:16, after Moshe objects to being chosen because of his speech impediment, Hashem tells him that Aharon his brother will speak for him to Paroh and the nation. It does not, however, say that Aharon was to do the miracles that Hashem had told Moshe to do. If this is the case, how come it is Aharon who performs the first three plagues instead of Moshe?
The answer is Hakarat Hatov. The Tiferet Tzion tells us what happened. He says that really Hashem did ask Moshe to take his staff and hit the water to make it turn into blood. However, Moshe remembered what had happened to him when he was just three months old, when he was put into the water not to be killed, but to be saved. When Moshe realized this, he asked Hashem, "If someone drinks from a well, should he later throw stones in it?" He objected to the fact that something, even if it was inanimate, had saved him and hitting it would not be proper gratitude. Therefore Hashem told Moshe to inform Aharon to start the plague of blood as well as the plague of frogs, both of which required hitting the water of the Nile River.
When it came to the third plague, lice, the Shemot Raba says that Moshe also objected to Hashem's command of hitting the ground to make lice sprout forth. He used the same reasoning as he did for the first two plagues. He told Hashem that since the ground had saved him when he killed the Egyptian and buried him under the sand (2:12), it would be ungrateful of him to hit it in return. Hashem's command was therefore directed at Aharon that he would hit the ground.
We can learn a great lesson from Moshe here. We see that even toward inanimate objects such as sand and water, he still repays them by not smiting them. If Moshe has such Hakarat Hatov to inanimate objects, how much more so we should be thankful to those who live and have feelings. If we could only learn to be more grateful to others, we can lessen our Sin'at Chinam and hurry the arrival of the third Bait Hamikdash.