12 For all who have sinned without the law will also perish without the law, and all who have sinned under the law will be judged by the law.
13 For it is not the hearers of the law who are righteous before God, but the doers of the law who will be justified. – Romans 2:12-13
The law refers to the law of Moses that was given by God on Mount Sinai (Exodus 20:2). But there were many generations of mankind who existed before the law was given. What determined moral correctness before the law? The word of God. In the Garden of Eden man walked with God (Genesis 3:8), Enoch walked with God (Genesis 5:22-24), Noah walked with God (Genesis 6:9) and when the Son of God came to live among us His disciples walked with Him. The Word of God became flesh and dwelt among us and the disciples saw His glory.
And the Word became flesh and dwelt among us, and we have seen his glory, glory as of the only Son from the Father, full of grace and truth. – John 1:14
Developing a personal relationship with God, by walking with Him in this life, keeps a person from sin. We may still fall and fail. However, repenting of our sin and returning to walk with Jesus brings us back into fellowship with Him. John knew the truth of this:
7 But if we walk in the light, as he is in the light, we have fellowship with one another, and the blood of Jesus his Son cleanses us from all sin.
8 If we say we have no sin, we deceive ourselves, and the truth is not in us.
9 If we confess our sins, he is faithful and just to forgive us our sins and to cleanse us from all unrighteousness.
10 If we say we have not sinned, we make him a liar, and his word is not in us. – 1 John 1:7-10
Before the law was given God spoke with men who walked with Him and He gave them direction. Adam was told not to eat of the tree of the knowledge of good and evil (Genesis 2:17). Abraham was told to leave his town, family and inheritance (Genesis 12:1) as they were practicing idolatry. Lot was told to leave Sodom due to the wickedness and pride of the city (Luke 17:28). The Lord guides those who listen to Him and walk with Him.
The Jewish people began to be proud and believe they were special because they had the covenant relationship with God and they had the law. In this passage Paul is challenging them, pointing out that it is the person that hears the word of God and does it that is righteous, not the “hearers” of the law, those who talk about the meaning of the law and debate the practical ways to overcome the difficulties of following the law as did the Scribes and the Pharisees. Hear the word of God and do it. Simple really. So why do we find it so difficult? Well, sin, the flesh and the devil all want to prevent us from walking with God. But thank God He has given us the Holy Spirit and sealed us till the day of redemption:
And do not grieve the Holy Spirit of God, by whom you were sealed for the day of redemption. – Ephesians 4:30
What grieves the Holy Spirit? Us knowing the truth but not walking in the truth, because now we can walk with Jesus through the power of the Holy Spirit, the most amazing privilege, that the prophets of old would have loved to experience.
For truly, I say to you, many prophets and righteous people longed to see what you see, and did not see it, and to hear what you hear, and did not hear it. – Matthew 13:17