You remember the story. it is found in the Book of Ruth.
It happened during the time of the judges, a period of Israel's history that was noted primarily for the faithfulness and rebellion of the people. Indeed the book of Ruth follows the book of Judges, the final sentence of which reads, "In those days there was no king in Israel; all the people did what was right in their own eyes" (Judg. 21.25). The nation had forgotten God . . . the famine that provides the setting for the book of Ruth is not coincidental.
The opening five verses of Ruth tell a distressing story of a family seeking security and prosperity during a time of famine only to be met by death and widowhood.
You remember the details. Elimelech and his wife Naomi live in the city of Bethlehem. They have two sons, named Mahlon and Chilion. The family, facing the ravages of famine decide to leave Bethlehem and move to the country of Moab. There, they hope, their family will be secure and prosper. But, in time, Elimelech diesm and "Naomi is left with her two sons" (Ruth 1.3). The sons marry Moabite women, Orpah and Ruth. The marriages, however, prove fruitless, and in a few years, both sons/brothers die. "Naomi was left without her twos sons and her husband" (v. 5).
What a tragic story. Where was God? He is curiously absent from the narrative. Did the family of Elimelech know God? He is curiously absent from their thinking and in their decision to leave Bethlehem and move to Moab.
Consider the irony at play in this story. There was a time of famine in a land promised by God to be "flowing with milk and honey." There was a time of famine in Bethlehem, a city named, literally, "the house of grain/bread." had God forsaken his people? had he forgotten his promise to bless his people? No, famine was a consequence of faithlessness and rebellion . . . God had warned his people that times of famine would come when they forgot him (see Deuteronomy 28.15ff.).
Consider the irony of an Israelite family leaving the Promised Land for the wilderness. Moab was in the wilderness, where an entire generation of Israelites perished because of their faithlessness and rebellion. Doesn't their action belie their distance from God? Elimelech's family forgot God as they left their home during a time of famine. They sought security and prosperity in a foreign land; they found only death and widowhood.