When it says
Mat 5:20 For I say unto you, That except your righteousness shall exceed the righteousness of the scribes and Pharisees, ye shall in no case enter into the kingdom of heaven.
Exceed in what way exactly?
The Scribes and Pharisees had been hypocrites:
Matthew 23:1-4 (DRB) Then Jesus spoke to the multitudes and to his disciples, 2 Saying: The scribes and the Pharisees have sitten on the chair of Moses. 3 All things therefore whatsoever they shall say to you, observe and do: but according to their works do ye not; for they say, and do not. For they bind heavy and insupportable burdens, and lay them on men's shoulders; but with a finger of their own they will not move them.
They were, as the leaders of the day, also viewed (or rather they viewed themselves) as the moral authority or example (since they were the moral authority of the day). Jesus is in a way mocking them by using them as a minimum, or below-the-threshold example of moral living, by calling His disciples to walk the walk, and not merely talk the talk ("for they say, and do not").
I would suggest that Christ is here teaching what St. James does in his Epistle:
James 1:22 (DRB) But be ye doers of the word, and not hearers only, deceiving your own selves.
To hear Christ but bear no fruit, is like the womb that recieves seed but is nonetheless barren. Christ said of His disciples that bearing fruit is what it is to be His disciple—to keep His commandments, and to be loved by the Father:
John 15:1-10 (DRB) I am the true vine; and my Father is the husbandman. 2 Every branch in me, that beareth not fruit, he will take away: and every one that beareth fruit, he will purge it, that it may bring forth more fruit. 3 Now you are clean by reason of the word, which I have spoken to you. 4 Abide in me, and I in you. As the branch cannot bear fruit of itself, unless it abide in the vine, so neither can you, unless you abide in me. 5 I am the vine; you the branches: he that abideth in me, and I in him, the same beareth much fruit: for without me you can do nothing. 6 If any one abide not in me, he shall be cast forth as a branch, and shall wither, and they shall gather him up, and cast him into the fire, and he burneth. 7 If you abide in me, and my words abide in you, you shall ask whatever you will, and it shall be done unto you. 8 In this is my Father glorified; that you bring forth very much fruit, and become my disciples.
9 As the Father hath loved me, I also have loved you. Abide in my love. 10 If you keep my commandments, you shall abide in my love; as I also have kept my Father's commandments, and do abide in his love.
Which agrees with the verse which precedes that of our question:
Matthew 5:19 (DRB) He therefore that shall break one of these least commandments, and shall so teach men, shall be called the least in the kingdom of heaven. But he that shall do and teach, he shall be called great in the kingdom of heaven.