Yes. Jesus’ death on the cross earned an eternal salvation for all believers, whether they lived before or after him.
By grace, through faith
Believers in the Old Testament were not saved by being obedient to the law of God. The Bible clearly teaches: “By works of the law no human being will be justified in his sight” (Romans 3:20). We are not good enough to earn heaven. That is true for us now, and it was also true for believers in the Old Testament.
Neither were Old Testament believers saved by animal sacrifices. “For it is impossible for the blood of bulls and goats to take away sins” (Hebrews 10:4). Instead, the Old Testament sacrifices pointed towards the one sacrifice that Jesus would make on the cross to bring an eternal salvation.
Like New Testament believers, Old Testament believers were justified by grace through faith. About Abraham we read: “He believed the LORD, and he counted it to him as righteousness” (Genesis 15:6). He was not saved by works, but by faith.
The content of the faith of Old Testament believers has several aspects. It always trusts in the God who created heaven and earth. It is always willingness to live according to God’s commandments. It is always trust in God’s promises.
The most important of God’s promises was the promise of the Messiah. Many prophecies in the Old Testament pointed towards the Messiah, and it is hard to know how much of this and how precisely this was understood by Old Testament believers. Yet there certainly was a joyful expectation of God’s salvation through the Messiah, and even a prophetic understanding of it. Jesus said to the Jews: “Your father Abraham rejoiced that he would see my day. He saw it and was glad” (John 8:56).
The eternal salvation that Jesus brought is therefore not just for the New Testament believers. His death is described as “a death that has occurred…” and “…that redeems them from the transgressions committed under the first covenant” (Hebrews 9:15).
God knows everything
How is it possible that people’s sins were forgiven based on Jesus’ sacrifice, if they died even before that sacrifice took place? That is because God knows everything. There is an eternal aspect to salvation. Revelation 13:8 is talking about the people worshiping the beast as “…everyone whose name has not been written before the foundation of the world in the book of life of the Lamb who was slain”. God wrote all the names of the people to be saved in His book even before the world was created. He ordained that the sacrifice of Jesus was the way they would be saved. And He applied the benefits of that sacrifice to all believers, whether they lived before or after the time of Jesus.
Of course, the most important question is not ‘were Old Testament believers saved by Jesus?’, but: have you been saved by Jesus? Put your trust in Him, and you will inherit eternal life and be with Him forever, together with all the believers from the Old and the New Testament.