Deuteronomy 32:51

Because ye trespassed against me among the children of Israel at the waters of Meribah-Kadesh, in the wilderness of Zin; because ye sanctified me not in the midst of the children of Israel.

Deuteronomy 32:51 means that Moses and Aaron were barred from entering the promised land, Moses from leading Israel in, because at Meribah-Kadesh they failed to sanctify, honor, and glorify God before Israel. The failure was concrete disobedience: though commanded to speak to the rock, Moses struck it twice and spoke as though he and Aaron themselves would bring out the water, taking the glory to himself rather than giving God the credit and magnifying Him as the source of the water's power. In doing so Moses acted in anger. The failure involved lack of trust in God and falling short of God's standard, which brought God's displeasure.

It came near the end of Israel's long wilderness journey, when weariness briefly weakened Moses's faith. Moses's honored position and close relationship with God made his failure especially serious. His punishment showed Israel how God regarded their repeated murmuring and their blaming of Moses for God's acts. Though Moses repented and humbled himself, the consequence remained, and he told the people that his sin kept him out.