Jesus was tested one day by a lawyer and asked what the great commandment was.
“Teacher, which is the great commandment in the Law?” And He said to him, “’You shall love the LORD your God with all your heart, and with all your soul, and with all your mind.’ This is the great and foremost commandment. The second is like it, ‘You shall love your neighbor as yourself.’ On these two commandments depend the whole Law and the Prophets.” Matthew 22: 36 – 40
Jesus’ source of the second great commandment is Leviticus (the first great commandment was from Deuteronomy).
You shall not take vengeance, nor bear any grudge against the sons of your people, but you shall love your neighbor as yourself; I am the LORD. Leviticus 19: 18
Regarding this law of God, the New Testament tells us this:
Now we know that whatever the Law says, it speaks to those who are under the Law, so that every mouth may be closed and all the world may become accountable to God; because by the works of the Law no flesh will be justified in His sight; for through the Law comes the knowledge of sin. Romans 3: 19 – 20
…for all have sinned and fall short of the glory of God…Romans 3: 23
…for the Law brings about wrath…Romans 4: 15
I would not have come to know sin except through the Law; for I would not have known about coveting if the Law had not said “You shall not covet.” But sin, taking opportunity through the commandment, produced in me coveting of every kind; for apart from the Law sin is dead. I was once alive apart from the Law; but when the commandment came, sin became alive and I died; and this commandment, which was to result in life, proved to result in death for me; for sin, taking an opportunity through the commandment, deceived me and through it killed me. Romans 7: 7 – 11
For as many as are of the works of the Law are under a curse; for it is written, “Cursed is everyone who does not abide by all things written in the book of the law, to perform them.” Galatians 3: 10
For if a law had been given which was able to impart life, then righteousness would indeed have been based on law. But the Scripture has shut up everyone under sin…Galatians 3: 21 – 22
The primary function of the law in Biblical teaching is to prepare you for the gospel of Jesus Christ by exposing your sins and your need for a salvation outside of the law. For no one has ever “loved God and loved neighbor” according to the standards of God. Without Christ we would be condemned.
For the Law was given through Moses; grace and truth were realized through Jesus Christ. John 1: 17