Not at first. Slavery was a common practice throughout Africa. However, African slaves in Africa were generally treated with a certain amount of dignity at the least they were recognized as people. They could still be beat and forced to do labor etc. But because they were human they were afforded certain rights. Much in the same way the Old Testament provided rules for treatment of slaves. This was the type of slavery that rulers originally thought they were participating in.
Some rulers even tried to stop the trade once they realized how it was. Unfortunately, the economics of slavery support those that are in favor of the most brutal methods. Europeans would support candidates for king that agreed to continue the slave trade. Europeans would pay one nation or a group of nations to go to war with each other so that the prisoners of these wars could be sold as slaves. By the mid 18th century the African rulers of coastal West Africa permitted and even encouraged more brutal methods than even the Europeans.
These kings would send convoys of canoes/rafts inland to pick up slaves. Often these journeys would take days or weeks. The slaves would sometimes be bound on the bottom of a canoe with little food or water. If someone managed to escape the slave traders would set dogs on them occasionally allowing the dog to kill the prisoner as an example to the other slaves.
After the slaves arrived on the coast they would be sold to the Europeans. Often those that the Europeans refused to buy would be killed on the spot.
We don't have records for all rulers to prove that they knew or didn't know about the horrors but if they were willing to go to war and kill millions to enslave people, if they were willing to finance and operate brutal slave missions in their own land and if they were willing to see slaves killed in their own cities, I can't imagine they much cared what happened after the slaves were sold.
An account by a doctor for a slave ship later turned abolitionist.
Good article about African participation in the slave trade
EDIT* I can't find it right now but I recall an account where the African slave traders had to wait until the European buyers left before killing the slaves because the Europeans were horrified by the executions.