In the KJV, "imagine" usually means to plot or devise harm, as enemies do against people (Psalms 38:12) or nations against God, always in vain (Psalms 2:1; Nahum 1:9). God forbids plotting evil against a neighbour (Zechariah 8:17).
In the KJV, "imagine" usually means to plot or devise harm, as enemies do against people (Psalms 38:12) or nations against God, always in vain (Psalms 2:1; Nahum 1:9). God forbids plotting evil against a neighbour (Zechariah 8:17).