Do you not realize that Christ taught obedience to God's commands?
First, he said the #1 commandment is Deuteronomy 6:4-5 ESV
Let me point out, that when you study further to find out what it means to love God with all of our heart, soul and might, it is directly connected to obeying his law.
And the #2 commandment is Leviticus 19:18 ESV
So as you see, the 2 most important things are from the Law of God, also known as the Law of Moses.
These are not the only commands that are to be obeyed.
Do you really think that Christ preached and taught and lived a life contrary to God's law? NO!
He showed us the proper way to obey God's law! Christ is our example. The way of life that the law teaches us to live, is personified and displayed in Christ. Surely you would agree with that?