For many people, slavery is a huge obstacle to faith. When we look in the Bible and see that slavery was a common practice in the Old Testament, and that rather than abolish it, God actually regulated it, even Christians start questioning what on earth is going on? As is usually the case with the Bible, this is not a simple issue.
When we think of slavery, we specifically think of 18th/19th century slavery. But Biblical slavery is different in a number of ways. For one thing, whereas almost every other slave trade from ancient times to the modern day was founded largely on kidnapping, Biblical slavery was almost entirely voluntary. Biblically speaking, kidnapping is evil. If you partake in kidnapping, whether you're the kidnapper, an accomplice, or the one who bought the victim, you're sinning, the penalty for which was death in pre-Christian Israel (Exodus 21:16; Deuteronomy 24:7). Kidnapping is still a sin, and if unrepented of, a kidnapper will suffer for it eternally (1 Timothy 1:10). Thus, the main way to obtain a slave, under Old Testament law, was if they volunteered themselves as slaves in the first place.
Slavery was usually an alternative to destitution. If you were homeless, it made sense to become a slave so your master would become responsible for your food and shelter needs. If you were in debt, it made sense to become your creditor's slave (especially since you could also be imprisoned for failing to repay a debt). Slavery was so useful that by the time Jesus was born, even many people of high status, like doctors and lawyers, opted to become slaves.
But aren't the economic benefits outweighed simply by the fact your master could treat you worse than animals? No, because actually, Biblical slavery does not condone such evil treatment. Quite the opposite, Christians who own slaves are admonished to mind how they treat them, because God Himself is our master (Ephesians 6:9; Colossians 4:1), and He will repay. This transfers to the modern work force as well. If you are an employer, God is watching how you treat your employees, regardless of how the law allows you to treat them.
With God, there is no partiality. God doesn't look upon masters as being superior to their slaves, He sees a person He loves having authority over another person He loves. If you are a kind master to your slaves, God will be a kind master to you. If you are a jerk to your slaves, God will be hard on you.
Furthermore, although slavery is permissible, Biblically speaking, it is not seen as an ideal situation. Therefore, Paul says that slavery doesn't affect your status as a Christian, but if you are a slave and you can gain your freedom, God says do it (1 Corinthians 7:21). It is ok for a slave to seek and obtain their freedom. The logical extension of this is that if you're a Christian who owns slaves, offer them their freedom. If you believe God wants a man to be free, why would you keep him captive?
A major difference between Biblical slavery and other forms is that while they were usually race based, the Bible does not even have a concept of "race". All human beings are descended from Adam and Eve. We're all one race. Jew, Gentile, man, woman, black, white, slave, free, we're all one race. If you need a text to say that, look no further than Galatians 3:28: "There is neither Jew nor Greek, there is neither slave nor free, there is neither male nor female; for you are all one in Christ Jesus."
Ultimately, although the Bible does deal with slavery, slavery was not invented by God. Rather, slavery was a pre-existing, man-made institution. Correct me if I'm wrong, but it doesn't seem there is a single culture throughout history that has not had a form of slavery. Thus, it shouldn't surprise us that Israel had it too. Israel themselves started as slaves.
There is a comparable scenario in the Bible. God has always hated divorce. Both in the Old Testament and the New, divorce has been seen as a despicable thing. The Bible even goes so far as to say that divorce is violence (Malachi 2:16). And yet, we know that God allowed it in Old Testament times because Israel was a hard hearted nation that was virtually guaranteed to do it anyway (Matthew 19:8; Mark 10:5). So God basically said to Himself "if they're going to do it, they're going to do it on my terms".
We see from the above that slavery is also not something God sees as good or ideal. Slavery is something that is common to mankind, it was always going to be a thing, so rather than placing a divine stamp of approval on the practice, He put restrictions on it until it could be removed (which, it should be noted, Christians like William Wilberforce were motivated by their faith to attempt to do).
So, clearly, the Bible is not endorsing kidnapping black people and beating them half to death if they refuse to accept a new name and work for no wages. Biblical slavery was radically different from the slavery we think of today, to the point where one must ask if they even deserve the same name (which, it should be noted, not all translations give them anyway). But here's where we get to the real meat of the issue: You are a slave.
If you're a Christian, there are plenty of places in the Bible that call you a slave of God. But if you're not a Christian, you're still a slave. It's just that you're a slave to a much more cruel master. You are a slave to sin (John 8:34; Romans 6:16). You are not free. You are bound to the will of your flesh, you are forced to obey, like an addiction. But Jesus can set you free from this bondage, so you no longer have to serve your master, nor perish with it. Take Him up on His offer, and you will know true freedom.