Originally, she was a Turkish slave girl that the previous sultan bought for his wife. When the sultan died, his only heir was away defending the caliphate against the Seventh Crusade, and Shajar al-Durr feared a coup d'état from the mamluk. Instead, she hid his death from the public and and installed herself as the sultan in the heir's absence.
After revolts within the population, she was forced to take a husband, who installed the first Mamluk state within Egypt. Her gambit failed and, after the mysterious death of her husband, she was horribly beaten by the retinues of a rival and tossed down into the moat, but she was saved by the Nosferatu Umm al-Mawt who inhabited the moat of the castle. He soon left her to her own devices.
After Shagaret returned into public, she mounted a campaign against the treatment of non-muslim Nosferatu within Cairo and built a haven for all who wanted to hide from the Hajj and the mameluke Prince that controls the city. The movement called themselves the Alnilam and, over the centuries, they have gotten strong enough to oppose the merciless rule of the Hajj. Some even suspect her as the secret leader of a Gehenna cult.
For the historical figure, see Shajar al-Durr.