Having just watched a television movie about Moses, I wondered why God told Moses and his people “Thou shall not kill” as part of the 10 commandments, yet a short time later, in Joshua, God commands his people to kill every one, women and children included?
First of all the intent of the commandment is to prohibit murder, not killing in general. Accidental death, warfare, and self defense were treated differently under the Law. But in Genesis 15 :13-21 the Lord gave the promised land to Abraham’s descendants, but said that they couldn’t occupy it for 400 years because the sin of the Amorites who lived there was not complete. That means He had promised to give the Amorites 400 years to repent of their sins. In Deut. 18:9-12 the Lord said He was going to have the Israelites drive out the Amorites because of their detestable ways. That means after 400 years they still hadn’t stopped their sinful ways and so God was using the Israelites as His instrument of judgment. In order to kill every trace of their false religion everyone of them had to die. The adults died as punishment for their sins. The children died because the Lord was taking them unto Himself to be His forever.