He sinned against the first commandment of God’s law (see 1 Kings 11:1). He served many gods. Such idols do not fill your heart with love as the Lord does, and so you keep looking. Astarte was the sensual goddess of sex. In the worship of Moloch you see how bad idolatry is. You never know if what you give is enough. When nothing happens, you end up giving more and more—and finally you sacrifice your child. It is horrible. When the king of Moab sacrificed his son, Israel became so angry that they left (2 Kings 3:26–27). That is the right response to these disgusting practices.
4 For when Solomon was old his wives turned away his heart after other gods, and his heart was not wholly true to the LORD his God, as was the heart of David his father.