No, Jesus did not "cancel" Exodus 22:11; he got to the heart of it.
There are at least two kinds of swearing in the Tanakh. The first is an oath a person makes to God as an indication of their sincerity to do something they said they would do. The second is an oath made to another person to make clear their intention to do or not to do something.
There are obvious similarities in the two kinds of swearing, but the primary difference is that one is vertical, involving a person's relationship with God, whereas the other is horizontal, involving a person's relationship with a fellow human being.
Oaths are serious business in the Scriptures. God himself repeatedly swore to the patriarchs on the basis of who he is that he would fulfill his oaths to them:
15 The angel of the Lord called to Abraham from heaven a second time 16 and said, “I swear by myself, declares the Lord, that because you have done this and have not withheld your son, your only son, 17 I will surely bless you and make your descendants as numerous as the stars in the sky and as the sand on the seashore. Your descendants will take possession of the cities of their enemies, 18 and through your offspring[b] all nations on earth will be blessed,[c] because you have obeyed me” (Genesis 23 NIV, my emphasis).
In other words, on the basis of his infinite character and promise-keeping ability, he would bring about what he had promised on oath to Abraham (and to Isaac and Jacob).
As his image-bearers, God's children, too, are bound by their oaths, both to God and to their fellow human beings. Image-bearers have neither the ability nor the right to swear by themselves, but when they say on oath they will do something, they have thereby committed themselves to do it.
Notice in Jesus's words in Matthew 5 that Jesus is saying in effect to his audience on the mountainside, and I paraphrase:
“You have neither the ability nor the right to swear by yourself in the same way God does, so don't even try. You must not, therefore, swear by heaven, by God, by Jerusalem, or even by your own head, because you are finite and imperfect. A simple yes or no will suffice as your commitment to do or not to do.”
Indulge me this little analogy. In a courtroom, more than occasionally a prosecutor or a defense lawyer in questioning a witness will say something along the lines of, "My question requires a simple yes or no. So: Yes or no?"
The very human reaction to such a question is to say, "But I can't give a yes or no. There are too many factors--exceptions, qualifiers--involved for me to give a straight yes or no." That may be true, but what Jesus here is saying here, in essence, is that sometimes a simple yes or no will suffice. Anything more would complicate things and perhaps even make things worse, causing one to sin.
In conclusion, think of Exodus 22:11 as a lesson to God's image-bearers on the importance of being earnest. Interestingly, in another context, earnest money is money which secures a pledge to buy something, and it gives the seller the right to demand final and complete payment according to a mutually agreed upon contract. Think of Matthew 5:34 as a way of fulfilling the spirit of the Law in courtroom-like fashion. In other words, Jesus is stripping down the concept of oath-taking and swearing to its bare minimum; namely, yes or no. How fitting that all of God's promises in Jesus Christ are both yes and amen (2 Corinthians 1:20 NASB).