This passage, in context, is speaking of the extremity to which they will be driven due to God's punishment - when Judah's cities were besieged and there was famine to the point where, in desperation, they ate each other. It was not a common practice but a terrible indication of the depths they will plumb because of God's wrath towards them due to their disobedience. The Deuteronomy passage is exactly the same context:
Deuteronomy 28:52-55 "They shall besiege you at all your gates until your high and fortified walls, in which you trust, come down throughout all your land; and they shall besiege you at all your gates throughout all your land which the LORD your God has given you. 53 You shall eat the fruit of your own body, the flesh of your sons and your daughters whom the LORD your God has given you, in the siege and desperate straits in which your enemy shall distress you. 54 The sensitive and very refined man among you will be hostile toward his brother, toward the wife of his bosom, and toward the rest of his children whom he leaves behind, 55 so that he will not give any of them the flesh of his children whom he will eat, because he has nothing left in the siege and desperate straits in which your enemy shall distress you at all your gates.