Al-Khayzuran was from Jorash, near modern Bisha, Saudi Arabia. She was kidnapped from her home by a Bedouin who then sold her in a slave market near Mecca to Al-Mahdi during his pilgrimage. All sources are nevertheless adamant that she was a slave, and this does seem not to have been unusual in practice.
Government and political affairs office
Reign of Al-Mahdi And the head of his court
Al-Khayzuran was described as beautiful, intelligent and gifted: at that time, the woman slaves or Jawaris of the harem were famed for educating themselves in music, singing, astrology, mathematics and theology in order to keep their master's interest, and Al-Khayzuran took regular lessons in fiqh by the most learned qadis. She eventually became the favorite concubine of Al-Mahdi, called jarya or jawari. Upon his succession as Caliph in 775, she managed to convince him to free her and marry her, depriving his first spouse, princess Rayta, daughter of Caliph Al-Saffah, of her privileges: she also convinced him to deprive his son in his first marriage from the position of heir to the throne, and instead name her sons as heirs, despite the fact that the custom at that time did not allow for the sons of a slave to be named heirs.
At the court, she was an ally of the Barmakids. During the reign of her spouse, Al-Khayzuran raised to an unusual position for a woman; she was not secluded in the harem, but held audiences with generals, politicians and officials in her chambers, mixing with men and discussing state affairs. She recalled her mother, two sisters and two brothers to court, married her sister Salsal to prince Ja'far and named her brother Ghatrif governor of Yemen.
Except their two sons, the couple also had a daughter, Banuqa, who her father loved so much that he dressed her up as a boy to be able to bring with him during his travels: when she died young, her father made a scandal by demanding public condolences, which was not seen correct for a daughter.
Reign of Al-Hadi and partner of his reign and his regent
In 785, Al-Mahdi died during an expedition with his son Harun, who rushed back to Baghdad to inform her. Her two sons were also absent from the city, and to secure the succession for her son, she called upon the viziers and ordered them to pay the wages of the army to secure order, and then had them swear allegiance to her son as their new Caliph in his absence.
Al-Khayzuran reportedly wished to continue to engage in politics during the reign of her son: "Khayzuran wanted to dominate her son as she had previously dominated his father, al-Mahdi." She continued to give audiences in her chambers and discuss state affairs during the reign of her son Al-Hadi: "She continued to monopolize decision-making without consulting him [al-Hadi]. She behaved as she had before, during the reign of al-Mahdi ... . People came and went through her door." Al-Hadi, however, opposed her participation in state affairs and attempted to exclude her from them, reportedly saying: "it is not in the power of women to intervene .. . in matters of sovereignty. Look to your prayers and your prayer beads." He disapproved of the fact that his mother gave audiences to officials and generals and conferred with them, thus mixing with men, which was not normal in a culture where women were expected to live secluded in the harem, and he publicly addressed the issue of his mothers public life by assembling his generals and asked them: 'Who is the better among us, you or me?' asked Caliph al-Hadi of his audience. 'Obviously you are the better, Commander of the Faithful,' the assembly replied. 'And whose mother is the better, mine or yours?' continued the caliph. 'Your mother is the better, Commander of the Faithful.' 'Who among you', continued al-Hadi, 'would like to have men spreading news about your mother?' 'No one likes to have his mother talked about,' responded those present. 'Then why do men go to my mother to speak to her?'
Despite his opposition, Al-Hadi did not manage to disturb his mother's power base, and she refused to retire from politics into the harem. The conflict was finally exposed in public when she interceded in favor of a supplicant, Abdallah ibn Malik, and publicly demanded a reply from her son, who lost his temper and openly yelled at her and said: "Wait a moment and listen well to my words ... . Whoever from among my entourage - my generals, my servants - comes to you with a petition will have his head cut off and his property confiscated. What is the meaning of those retinues that throng around your door every day? Don't you have a spindle to keep you busy, a Koran for praying, a residence in which to hide from those besieging you? Watch yourself, and woe to you if you open your mouth in favour of anyone at all."
Al-Khayzuran is rumored to have had her eldest son Al-Hadi murdered after this incident. One reason given is that she learned that he was planning to kill his brother Harun al-Rashid, another that he attempted to poison her himself, which she discovered after first allowing her dog to eat of the dish he had sent to her. One version claims that she gave the task of killing him to one of his slave concubines, or jawari, to suffocate him with cushions.
Reign of Harun al-Rashid and partner of his reign and his regent
Her second son, Caliph Harun al-Rashid, in contrast to his brother, did not oppose to his mother participating in the affairs of state, but instead openly acknowledged her political ability and publicly trusted her advice, and governed the realm by her side. He was proud to point out that there was no reason for him to be ashamed of sharing his power with a woman, if she had such ability and brilliance as Al-Khayzuran. Though it is difficult to say exactly in which issues she pressed her policy, it is nevertheless acknowledged that she participated in the decision making that formed the policy of the Caliphate.
"The histories do not detail Khayzuran's political achievements, but coins were struck in her name, palaces were named for her, and the cemetery in which subsequent Abbasid rulers were laid to rest carries her name, all testifying not only to status but also to civic largesse."
When she died in 789, her son broke the rules which demanded that he show no sorrow, and instead publicly demonstrated his sorrow and participated in her funeral, which attracted much attention.
Al-Khayzuran and her strong personality is believed by many literary historians to be a key influence on Scheherazade, the main character in One Thousand and One Nights. Many of the stories were influenced by Harun al-Rashid and his fabulous court.