In the book of 1. John righteousness is described as something we obtain by our obedience to it. The more we obey righteousness, the more righteous we are. Righteousness is defined as doing the opposite of lawlessness, so we know from 1. John and Ex 19, when we obey the law of Moses, we become righteous.
If you google the definition of legalism, it is defined as man’s attempt to obtain salvation by works.
What is the difference between trying to obtain salvation by works, and becoming righteous by obedience to the law of Moses?
Paul and Jesus define works as men attempt to become righteous by their law and, at the same time, rejecting God’s law. We can not, at any moment in time, earn anything from God by obedience to our laws. We can only be righteous, and in a right relationship to God, by obedience to His law the law of Moses.
Can we earn anything from obeying the law of Moses?
Deut 28:1-14 and Matt 6:25-34 says if we obey, we are guaranteed Yehovahs help in everything we do. So yes, we can earn what we need by our obedience to the law of Moses.
But what about salvation?
First of all, we have to understand what salvation is.
We need salvation because we have all at one time or another sinned against Yehovah. Sin is defined as breaking God’s law, the law of Moses. So because we are criminals in God’s eyes, we need to be reconciled to Him.
In God’s justice system, in the book of Leviticus, it says Yehovah can not forgive intentional crimes. If we sin intentionally, we are cut off and lost forever. This all changed when Jesus was born. When Jesus was born, His sacrifice on the cross gave us forgiveness for intentional and unintentional sins for the first time in history.
Now we can be forgiven for our intentional and unintentional sins by believing He died for us and repenting back to righteousness.
So even though we are righteous when we obey Moses, obedience to Moses can not forgive us for our intentional sins. This is why we need the cross and what Yeshua did for us, and this is why work-based salvation is an impossibility. This is also why it is impossible to obtain righteousness by merely believing in the cross. Righteousness comes from our obedience to Moses; reconciliation and forgiveness come by our faith in the cross. If we are going to inherit eternal life, we need both.