(Exodus 21:20-21)--"And if a man strikes his male or female slave with a rod and he dies at his hand, he shall be punished. 21If, however, he survives a day or two, no vengeance shall be taken; for he is his property."
God permitted slavery to exist in both Old and New Testament times. But this does not mean that slavery was a God-ordained system. Slavery was an invention of fallen man--not of God. Nevertheless, God allowed it to exist the way He allows other things to exist that He does not approve of: murder, lying, rape, theft, etc.
God also works within the system of fallen man and makes allowances for the freedom and failures of mankind within that system. We see this, for example, in Jesus saying that God allowed divorce because of the hardness of peoples' hearts (Matt. 19:8). The fact is, people are sinners and do things contrary to the will of God. But, even though people have murdered, lied, raped, and stolen, God has still used people who've committed these sins to accomplish His divine will. Moses murdered an Egyptian but was used by God to deliver Israel. David committed adultery but was promised to have the Messiah descend from his seed. This is proof that though God desires that people not do much of what they do, He permits them their freedom yet uses the system and the people according to His divine will.
In the case of a slave being property, that is simply the way things were done back then. As I said, God worked within the fallen system of man and put limits and guidelines concerning the treatment of slaves.
This article is also available in: Indonesia