Leviticus 26:29
27 “‘If in spite of this you do not obey me but walk in hostility against me, 28 I will walk in hostile rage against you, and I myself will also discipline you seven times on account of your sins. 29 You will eat the flesh of your sons and the flesh of your daughters. 30 I will destroy your high places and cut down your incense altars, and I will stack your dead bodies on top of the lifeless bodies of your idols. I will abhor you. 31 I will lay your cities waste and make your sanctuaries desolate, and I will refuse to smell your soothing aromas.
2 Kings 6:28
26 While the king of Israel was passing by on the city wall, a woman shouted to him, “Help us, my master, O king!” 27 He replied, “No, let the Lord help you. How can I help you? The threshing floor and winepress are empty.” 28 Then the king asked her, “What’s your problem?” She answered, “This woman said to me, ‘Hand over your son; we’ll eat him today and then eat my son tomorrow.’ 29 So we boiled my son and ate him. Then I said to her the next day, ‘Hand over your son and we’ll eat him.’ But she hid her son!” 30 When the king heard what the woman said, he tore his clothes. As he was passing by on the wall, the people could see he was wearing sackcloth under his clothes.
Notes and References
"... The blessings and curses are not rewards and punishments. They are a formal part of the biblical covenants (Leviticus 26; Deuteronomy 28) - with exact parallels in legal contracts of the ancient Near East. They express the outcomes of fulfillment or non-fulfillment of the covenant's terms. A people who is faithful to its God and keeps the Sabbath and honors its parents and does not steal will be prosperous and enduring in its land. A people who loses sight of its commitments and values will suffer. (It should not be hard to think of contemporary parallels.) The frightful curse of eating one's own children comes true centuries later in one of the most horrifying stories in the Bible (2 Kings 6:24-30). It is not presented there as a punishment. It rather conveys the terrible state of things in Israel in the wake of the heretical reigns of Kings Ahab and Jehoram. There is a big difference between a punishment and a curse, between a threat and a warning ..."
Friedman, Richard Elliott Commentary on the Torah: With a New English Translation (p. 1087) Harper Collins, 2003