The relation between our Lord's teaching and that of the Old Testament is cleared up by our Lord in one striking sentence. He says, "Don't think that I came to destroy the law, or the prophets. I didn't come to destroy, but to fulfill" (Matthew 5:17).
Jesus came to fulfill the predictions of the prophets, who had long foretold that a Savior would one day appear. He came to fulfill the ceremonial law, by becoming the great sacrifice for sin, to which all the Old Testament offerings had ever pointed. He came to fulfill the moral law, by yielding to it a perfect obedience, which we could never have yielded - and by paying the penalty for our breaking of it with His atoning blood, which we could never have paid.
Do not despise the Old Testament under any pretense whatsoever. Let us never listen to those who bid us throw it aside as an obsolete, antiquated, useless book. The religion of the Old Testament is the embryo of Christianity. The Old Testament is the gospel in the bud. The New Testament is the gospel in full flower. The saints in the Old Testament saw many things through a glass darkly. But they all looked by faith to the same Savior and were led by the same Spirit as ourselves.
Also, beware of despising the law of the Ten Commandments. Let us not suppose for a moment that it is set aside by the gospel or that Christians have nothing to do with it. The coming of Christ did not alter the position of the Ten Commandments in the least. If anything, it exalted and raised their authority (Romans 3:31). The law of the Ten Commandments is God's eternal measure of right and wrong. By it, is the knowledge of sin. By it, the Spirit shows men their need of Christ and drives them to Him. To it, Christ refers His people as their rule and guide for holy living. In its right place it is just as important as "the glorious gospel." It cannot save us. We cannot be justified by it. But never, never let us despise it. It is a symptom of an ignorant and unhealthy state of religion when the law is lightly esteemed. The true Christian "delights in God's law" (Romans 7:20).
Adapted from The Gospel of Matthew by J.C. Ryle (Chapter 5).