1 Kings 11:4-10 KJV
For it came to pass, when Solomon was old, that his wives turned away his heart after other gods: and his heart was not perfect with the Lord his God, as was the heart of David his father. [5] For Solomon went after Ashtoreth the goddess of the Zidonians, and after Milcom the abomination of the Ammonites. [6] And Solomon did evil in the sight of the Lord , and went not fully after the Lord , as did David his father. [7] Then did Solomon build an high place for Chemosh, the abomination of Moab, in the hill that is before Jerusalem, and for Molech, the abomination of the children of Ammon. [8] And likewise did he for all his strange wives, which burnt incense and sacrificed unto their gods. [9] And the Lord was angry with Solomon, because his heart was turned from the Lord God of Israel, which had appeared unto him twice, [10] And had commanded him concerning this thing, that he should not go after other gods: but he kept not that which the Lord commanded.
I now realize that it was not stated explicitly and it was likely that Solomon did not do witchcraft but it also a possibility.