Hi,
The Mamluks were former slaves that became a Dynasty. They also became a ruling class. But even the former slaves did not abolish slavery. Can someone please shed some light on what slavery was like back then? We often only have the recent European Colonial style Slavery as a reference. Even the word Slave itself is racial (Slav). Perhaps Slavery wasn't always racial. Perhaps much more is lost in translation.
The use of slave soldiers was a distinguishing feature of Middle Eastern rule from the time of the Abbasids all the way up to the abolition of the Ottoman Janissary corps in 1826. As /u/sowser notes this should not be compared with racial slavery. The source of these slave soldiers was initially from Turkic tribes for the Abbasids, the Caucuses for the Mamluks and the Balkans for the Ottomans. In the latter two instances the slaves were "recruited" as young Christian children, converted to Islam and then raised as soldiery. In the Ottoman case this was systematized in the form of the devshirme.
Slavery as an overall institution in the Middle East was multi-faceted. It's my understanding that in the levant there was some continuation of late Roman forms of slave-based agriculture after the conquests. Arab courts made extensive use of eunuchs. Concubines were bought and sold. And there were various systems of slave soldiery instituted across the centuries. As such it would difficult to discuss "what slavery was like back then" except to reiterate that it would have been very different than transatlantic racial slavery. A concubine could become a full-wife. A slave soldier might become the leader of the entire army (or, indeed, take over the entire country) and depending on the country or the era they may have been or perhaps even were very likely to be manumitted on reaching adulthood. A eunuch's condition was obviously more permanent but they could very well be some of the most influential people in the palace.
The children of these slave soldiers in theory could not inherit the positions of their fathers. It gives you some idea of the privileges of this slave class that the free offspring of a slave soldier would want to do so. In practice many of these positions did end up being hereditary. By the time we get to the period of Ottoman rule in Egypt after the defeat of the Mamluk dynasty the term "Mamluk" is being used to describe both slave soldiers and the descendants of that elite who may or may not have ever been slaves themselves.
For more on the development of this system and how it played out I would check out Slaves on Horses by Patricia Crone. For how these societal systems played out I would look at Hodgson's The Venture of Islam. Unfortunately I can't point to any single volume on the Mamluks that I've read in any detail, but you might want to have a listen to this In Our Time podcast on the Mamluks.
I'm afraid I know exactly nothing about the Mamluks or the history of Egyptian slavery, so I'm really not qualified to address the thrust of your question, though hopefully someone else can. I will, however, comment on one point you've made.
Perhaps Slavery wasn't always racial
Racial slavery is the exception, not the norm, in the historical record. 'Race' as you and I would use the term is a very recent concept that only really begins to appear meaningfully in European discourse from the 16th century onwards, and it is influenced and defined by the experience of the transatlantic slave trade. You might find this answer and this one helpful explanations of this.
I've written a little bit yesterday here about how historians decide to describe a practice as slavery when they encounter it in the historical record, and racial motivation or degradation is not a requirement for identifying a practice as slavery. New World slavery stands out for taking a particular group of people and justifying their enslavement on the basis of perceived racial inferiority, but there is no inherent reason why slavery must be based on that kind of ideology. Nor is it necessary for victims of enslavement to be social outsiders at the moment of their enslavement - Orlando Patterson has the concept of the "fallen insider", which refers to the practice by which an otherwise fully accepted member of society finds themselves enslaved (as a legal punishment, for violation of social norms, as a means of absolving debt etc.)
It is important to emphasise that slavery is not in and of itself a specific system, in the sense that it does not recur throughout history with exactly the same features every time. Even though they have their origins in British colonialism, even 19th century slavery in the British Caribbean and the United States are generally treated as two distinct systems with common ancestry, rather than as two variations on exactly the same system. Rather, slavery is better understood to be a kind of system; a particular relationship that manifests itself between people recurrently in the historical record with variations in the details of practice. Slavery is defined essentially by the social isolation and reduction to the condition of property of the victim, but the environment and structure that facilitates that practice differs from context to context.