What exactly did Moses do wrong at Meribah?
Moses hit the mountain with his staff, instead of speaking to it, as God had told him to do.
Why did he do it?
Moses acted the way he did because he was compelled to do so by God's abstract "big picture" guidance:
Since Moses stood for an external law, Josuah had to bring the Israelites into the promised land, because he forshadowed Jesus; who came to fulfill the law.
Acts 13:39 (NIV) "Through him [Jesus] everyone who believes is set free from every sin, a justification you were not able to obtain under the law of Moses".
Mat 5:17 (NIV) “Do not think that I have come to abolish the Law or the Prophets; I have not come to abolish them but to fulfill them".
Gal 3:24-26 (NIV) "In fact, the Law was our teacher. It was supposed to teach us until we had faith and were acceptable to God. But once a person has learned to have faith, there is no more need to have the Law as a teacher. All of you are God’s children because of your faith in Christ Jesus".
Moses' wrongly commited act at the mountain, is similar to Jesus' wipping of the merchants in the temple. As far as God was concerned, in these two cases the end justified the means.
Phil 2:13 (NIV) "God ... works in you to will and to act in order to fulfill his good purpose".
Moses needed to step back so Josuah could take over, and Jesus needed to be crucified on that passover.
Another striking similarity between the Meribah incident and the Passion of Christ is that God specifically told Moses to take the staff with him, and in a similar fashion Jesus told his disciples to bring a sword to Getsemane.
Luk 22:36-38 (NIV) “He said to them, “But now if you have a purse, take it, and also a bag; and if you don’t have a sword, sell your cloak and buy one. It is written: ‘And he was numbered with the transgressors’; and I tell you that this must be fulfilled in me. Yes, what is written about me is reaching its fulfillment.” The disciples said, “See, Lord, here are two swords.” “That’s enough!” he replied”.
John 18:10 (NIV) "Then Simon Peter, who had a sword, drew it and struck the high priest’s servant, cutting off his right ear".
Luk 22:51 (NIV) "But Jesus answered, “No more of this!” And he touched the man’s ear and healed him".
Moreover, God hardened Pharao so that he would act in accordance with the big scheme at hand.
Ex 9:12 (NIV) "But the Lord hardened Pharaoh’s heart and he would not listen to Moses and Aaron".
Thus, both Pharaoh, Moses, and Peter, were compelled to act according to God's abstract "big picture" guidance. Nevertheless, these people had to bear the consequences of their actions; which in Pharoh's case was pretty grim.
What these three people did wrong is clearly stated in the Bible, why they did what they did is, however, not clearly seen.