Matthew 5:17-20 (New International Version)
17 “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. 18 For truly I tell you, until heaven and earth disappear, not the smallest letter, not the least stroke of a pen, will by any means disappear from the Law until everything is accomplished.
19 Therefore anyone who sets aside one of the least of these commands and teaches others accordingly will be called least in the kingdom of heaven, but whoever practices and teaches these commands will be called great in the kingdom of heaven. 20 For I tell you that unless your righteousness surpasses that of the Pharisees and the teachers of the law, you will certainly not enter the kingdom of heaven.
As human beings, when we are faced with having to follow a set of rules or regulations, we have the tendency to follow that set of rules and regulations as close to the letter of them as possible. For example, when we are given a speed limit, most of us will stay as close to that limit even though we might cheat a few miles over. Sad things is that even one mile over is stil disobeying the law. Rarely would someone go a few miles slower, just to make sure they do not break the law. The problem is a "heart" issue, we see the law as something we have to do, but we follow it out of compulsion, rather than out of obedience and willingness to please the lawgiver. The same is true with every aspect of our lives.
When Jesus came speaking about the Kingdom of God, which would be his reign in the lives of the people and their obedience to his reign in our hearts, he wanted to make it clear that he was not trying to displace Judaism and replace it with a new religion. If you read the passage above, you might think that Jesus set a bar that is too high to meet when he says, "For I tell you that unless your righteousness surpasses that of the Pharisees and the teachers of the law, you will certainly not enter the kingdom of heaven". What did he mean by this? The Pharisees and teachers of the law were supposed to be the most righteous people of the day.
If you read further, Jesus would go on to speak about many issues that surrounded the Law(which were the Ten Commandments and other laws found in the Old Testament). What he was syaing was that the intent of the heart determines whether or not you broke the law that God had given man. For example, later in Matthew 5 he likens anger(or hate) of your brother or sister to murder or looking on someone with lust to committing adultery.
The Pharisees and teachers were using the law against the people for their own interests, but yet in their hearts they were disobedient to it, through their treatment of others. God judges intentions of the heart just as much as He judges the actual commitment of the act itself.
The kingdom Jesus brings is one of the heart, and our intentions are what will be judged by God in all matters of behavior and obedience to His laws. First of all Jesus Christ points us to a law that we will never be able to fully obey, but at the same time he frees us from God's judgement when we place our faith and trust in him, as the one who has already paid for our disobedience to God and His law. We can only be righteous enough, have "surpassing righteousness", by allowing Jesus to reign in our hearts as our Savior and King.