Upvote:3
The things differed a lot between civilizations, status of slaves and the rewards promised for going to war.
First of all, there was no single, the same notion of "slavery" throughout history.
What in Muslim world is translated as "slave" could have a different meaning at the time and place where it was used. For instance, one could translate it as "vassal" or "recruit" and that would not be much less correct.
For instance, any mobilized soldiers are not de-facto free in any European army. They are not called "slaves", but what's the difference anyway?
Eastern societies throughout history were very hierarchical in such a way, that only the sultan could be called the single free person, with even his vizier could be considered a "slave", and the sultan had life-and-death power over him. Of course, this is not entirely translatable into European languages where we have traditional nobles, slaves, serfs, vassals, etc, and even in Europe the notions differ between cultures.
That said, Ancient Greeks and Romans had a few good examples of using slaves as soldiers in desperate circumstances. In all those known cases the slaves were promised freedom upon victory, so they were sufficiently motivated.