Deuteronomy 34:4,5: "Then the Lord said to him, “This is the land which I swore to Abraham, Isaac, and Jacob, saying, ‘I will give it to your descendants’; I have let you see it with your eyes, but you shall not go over there.” So Moses the servant of the Lord died there in the land of Moab, according to the word of the Lord."
The story context for God’s judgment begins in Exodus 17:1-7 when the people of Israel were quarreling and wanted Moses to give them water to drink. Moses went to the Lord, and God told Moses to "'Pass before the people and take with you some of the elders of Israel; and take in your hand your staff with which you struck the Nile, and go. Behold, I will stand before you there on the rock at Horeb; and you shall strike the rock, and water will come out of it that the people may drink.' And Moses did so in the sight of the elders of Israel."
On the second occasion of the request for water (Numbers 20) God again instructed Moses saying, “Take the rod; and you and your brother Aaron assemble the congregation and speak to the rock before their eyes, that it may yield its water. You shall thus bring forth water for them out of the rock and let the congregation and their beasts drink.” This was Moses' response: "So Moses took the rod from before the Lord, just as He had commanded him; and Moses and Aaron gathered the assembly before the rock. And he said to them, “Listen now, you rebels; shall we bring forth water for you out of this rock?” Then Moses lifted up his hand and struck the rock twice with his rod; and water came forth abundantly, and the congregation and their beasts drank." However, God was displeased with Moses' response, and states, “Because you have not believed Me, to treat Me as holy in the sight of the sons of Israel, therefore you shall not bring this assembly into the land which I have given them.”
The Lord particularly directed that Moses should speak to the rock, and that in response to the word waters would rush forth. In the Mt. Sinai experience (Exodus 17), Moses had been instructed to smite the rock; but in this case the rock was not to be smitten. While smiting the rock on the second occasion may seem like a small deviation, we later understand that this rock pictured Christ, 1 Corinthians 10:4. Hence it was important to show that Christ was not to be smitten (or sacrificed) a second time to provide life to the people.
Here Moses and Aaron sinned. Thus they were not permitted to see the Promised Land.