Justin Martyr was a Christian thinker who lived in the second century C.E. In his Apologia 1:44, she states the following:
Moses is more ancient than all the Greek writers. And whatever both philosophers and poets have asserted concerning the immortality of the soul or punishment after death, or contemplation of heavenly things, or doctrines of similar kind, they have received such suggestions from the prophets, as have enabled them to understand and interpret these things, and hence there seem to be seeds of truth among all men.
Justin's point seems to be that the Greek philosophers got their ideas about the immortality of the soul and post-mortem punishment from Moses, who came before them. Actually, he says they got those ideas from the "prophets," and I guess that's plausible, in light of Justin's view of when the Old Testament prophets wrote their books. Within Justin's mindset, the books of Isaiah, Jeremiah, and Ezekiel were written before 587 B.C.E., which was before Greek philosophers like Heraclitus and Plato came on the scene.
Many biblical scholars argue that the Hebrew Bible didn't have a rigorous conception of the afterlife, so they'd dismiss the idea that the Greeks got such an idea from ancient Israelite thought. Actually, they'd say it was the other way around: Jewish belief in the immortality of the soul arose from Greek influences.
Within the New Testament, there seems to be a belief that the Old Testament predicts an afterlife, more specifically the resurrection from the dead. Jesus in Mark 12:26-27 affirms that the resurrection of the dead is taught in Exodus 3:6, where God says he's the God of Abraham, the God of Isaac, and the God of Jacob. According to Jesus, God is the God of the living, not the dead, so Abraham, Isaac, and Jacob must be alive to God in some way--at least in that they have the potential to live again at the resurrection. And, in support of the resurrection, Paul in I Corinthians 15:54 quotes a version of Isaiah 25:7 saying that death will be swallowed up in victory.
Yet, Eusebius (third-fourth centuries C.E.), in his Ecclesiastical History Book I, Chapter 7 (which I discussed in my post, Jesus' Conflicting Genealogies), seems to assume that the Hebrew Bible lacks a rigorous conception of the afterlife. He states regarding Levirate marriage, the ancient Israelite law in which a man married his dead brother's widow to perpetuate seed for the childless dead brother: for because a clear hope of resurrection was not yet given they had a representation of the future promise by a kind of mortal resurrection, in order that the name of the one deceased might be perpetuated[.]
For Eusebius, the promise of a resurrection was not clear in the Mosaic era, so the Israelites were concerned about perpetuating their name through offspring. If a man died childless, his name would be cut off, and that was a tragedy. Consequently, the law of Moses commanded his brother to perpetuate offspring on his behalf, thereby preserving the name of the deceased. Such a law shows that the ancient Israelites didn't really have a firm conception of resurrection, for why seek to immortalize a person through his offspring if he'd rise from the dead and gain immortality that way?
At the same time, Eusebius believes that Levirate marriage foreshadowed the doctrine of the resurrection. So, even if the doctrine was not clear and explicit in the Mosaic law, the desire to perpetuate the name of a dead man expressed some concern about immortality, and the doctrine of the resurrection was a natural continuation of (or solution to) this concern.
As a Christian, I doubt that I can dismiss the words of Jesus and Paul on the existence of the concept of resurrection in the Old Testament. Yet, the Hebrew Bible doesn't appear to promote the doctrine explicitly. But perhaps it does so implicitly. That's not to suggest that the ancient Israelites believed in the resurrection, but the words of the Bible may have expressed a concern about immortality that the doctrine of resurrection solved. As many Christians like to say, "The Old Testament is the New Testament concealed" (or something like that--it's not exactly my favorite quote, but maybe it fits in this case!).