Did the ancient Hebrews believe there was a heaven and hell? Most likely not.
Most biblical scholars say they did not (this coincides with the fact that the Sadducees during the period of Jesus, which included all the Jewish temple priests, did not believe in a Resurrection).
Marcus Borg writes:
“For a long time now, mainstream biblical and theological scholarship has recognized that the belief in an afterlife did not emerge until nearly the end of the writing of the Hebrew Bible. The first unambiguous reference occurs in the last chapter of Daniel, seen by most scholars as the latest document of the Hebrew Bible, written around 165 BCE. Though the authors of the Psalms and other books often pray for deliverance from death, there is no clear affirmation of an afterlife until Daniel.This means that for all the previous centuries of the biblical period, people in ancient Israel didn’t believe in life after death. To state the obvious, “going to heaven” could not have been their motive for taking God seriously.”