Please tell me what exactly is "Moses' sin." I thought it was the killing of the Egyptian when he was younger. Or was it the revolt of the Levi tribe toward the end? What reason kept him out of the Promised Land?
Psalms 106:32-33 states that the people angered Moses at the waters of strife, that it went ill with Moses, and that he sinned with his mouth. The incident in question occurred in Numbers 20:7-13. Miriam had just passed on. The very next verse states that the people were complaining about the lack of water. This had happened many times during their wilderness experience. And like the other times, the people railed against Moses and Aaron, whining that they would have been better off if they had stayed in Egypt. Moses and Aaron responded by falling face down. They had also done this several times. Maybe they were tired of hearing the same old complaints, or maybe this was their posture of prayer. In any event, God responded quickly, telling Moses to speak to the rock in front of all the people. Water would come gushing out -- enough water for everyone.
Moses assembled the people, but he didn't follow orders quite the way he should have. Instead of just speaking to the rock, which would have demonstrated the power of the word over the power of his rod, he struck it twice, saying, "Listen, you rebels, shall we get water for you out of this rock?" It almost sounded as though Moses was taking credit for delivering the water. That was not true. Perhaps the strain of leading the people all those years was finally starting to show. He called them rebels, which in a sense they were. But God did not tell him to do this. Nor was there any mention of God at that point. All seemed directed at Moses and Aaron: "Must we bring water out of this rock?" Depending on how it's read, it could indicate doubt on the part of Moses.
The bottom line is that both he and Aaron disobeyed God. Moreover, the water that rushed out was no longer seen as a gift from God, but was a product of Moses and Aaron. The people were happy; God was not. He said, "You did not trust in me; and you did not honor me as holy" (Num. 20:13). Hence, neither of them would set foot into the Promised Land. Yet, it is important to notice that just as God did not abandon his people when they sinned, he did not abandon Moses and Aaron. But in this one instance, they didn't pass the test. When crunch time came, they didn't trust God. And all of this happened at the waters of Meribah.
That's the Biblical explanation, but frankly, the punishment just doesn't seem to fit the crime. In reading the whole story, Moses was an exemplary leader, the ideal mediator between the people and God, and always faithful to the covenant. One little mistake and he's punished forever! It hardly seems just.
In reality, the people who were writing this story knew that Moses did not lead them into the Promised Land. In fact, he had completed his assignment long ago. God had instructed him to lead the people out of Egypt (Ex. 3:10). They were out of Egypt. His job was done. So maybe this wasn't a punishment at all; maybe it was a reward! He was roughly 120 years of age at this point. They all knew that settling into the Promised Land would have its challenges. That land was fully occupied, and many battles were ahead of them. Surely it was time to let Joshua take over. It was time for Moses to rest. Granted, there might have been other ways for God to accomplish this, but the writers of the story chose to tell it like this. The end result is that Moses was free of his responsibility to the people, free to be with God on the mountaintop.