He was originally sent to Fatimid Egypt in 1164 alongside his uncle Shirkuh, a general of the Zengid army, on the orders of their lord Nur ad-Din to help restore Shawar as vizier of the teenage Fatimid caliph al-Adid. A power struggle ensued between Shirkuh and Shawar after the latter was reinstated. Saladin, meanwhile, climbed the ranks of the Fatimid government by virtue of his military successes against Crusader assaults against its territory and his personal closeness to al-Adid. After Shawar was assassinated and Shirkuh died in 1169, al-Adid appointed Saladin vizier, a rare nomination of a Sunni Muslim to such an important position in the Isma'ili Shia caliphate. During his tenure as vizier, Saladin began to undermine the Fatimid establishment and, following al-Adid's death in 1171, he abolished the Fatimid Caliphate and realigned the country's allegiance with the Sunni, Baghdad-based Abbasid Caliphate.
In the following years, he led forays against the Crusaders in Palestine, commissioned the successful conquest of Yemen, and staved off pro-Fatimid rebellions in Upper Egypt. Not long after Nur ad-Din's death in 1174, Saladin launched his conquest of Syria, peacefully entering Damascus at the request of its governor. By mid-1175, Saladin had conquered Hama and Homs, inviting the animosity of other Zengid lords, the official rulers of Syria's various regions. Soon after, he defeated the Zengid army at the Battle of the Horns of Hama and was thereafter proclaimed the "Sultan of Egypt and Syria" by the Abbasid caliph al-Mustadi. Saladin made further conquests in northern Syria and Jazira, escaping two attempts on his life by the "Assassins", before returning to Egypt in 1177 to address issues there. By 1182, Saladin had completed the conquest of Muslim Syria after capturing Aleppo, but ultimately failed to take over the Zengid stronghold of Mosul.
Under Saladin's command, the Ayyubid army defeated the Crusaders at the decisive Battle of Hattin in 1187, and thereafter wrested control of Palestine – including the city of Jerusalem – from the Crusaders, who had conquered the area 88 years earlier. Although the Crusader Kingdom of Jerusalem continued to exist until the late 13th century, its defeat at Hattin marked a turning point in its conflict with the Muslim powers of the region. Saladin died in Damascus in 1193, having given away much of his personal wealth to his subjects. He is buried in a mausoleum adjacent to the Umayyad Mosque. Saladin has become a prominent figure in Muslim, Arab, Turkish and Kurdish culture, and he has often been described as being the most famous Kurd in history.
Saladin was born in Tikrit in modern-day Iraq. His personal name was "Yusuf"; "Salah ad-Din" is a laqab, an honorific epithet, meaning "Righteousness of the Faith." His family was most likely of Kurdish ancestry,and had originated from the village of Ajdanakan  near the city of Dvin in central Armenia. The Rawadiya tribe he hailed from had been partially assimilated into the Arabic-speaking world by this time. In 1132, the defeated army of Imad ad-Din Zengi, the ruler of Mosul, found their retreat blocked by the Tigris River opposite the fortress of Tikrit, where Saladin's father, Najm ad-Din Ayyub served as the warden. Ayyub provided ferries for the army and gave them refuge in Tikrit.
Mujahed al-Din Bihruz, a former Greek slave who had been appointed as the military governor of northern Mesopotamia for his service to the Seljuks, reprimanded Ayyub for giving Zengi refuge and in 1137 banished Ayyub from Tikrit after his brother Asad al-Din Shirkuh killed a friend of Bihruz in an honour killing. According to Baha ad-Din ibn Shaddad, Saladin was born on the same night that his family left Tikrit. In 1139, Ayyub and his family moved to Mosul, where Imad ad-Din Zengi acknowledged his debt and appointed Ayyub commander of his fortress in Baalbek. After the death of Zengi in 1146, his son, Nur ad-Din, became the regent of Aleppo and the leader of the Zengids.
Saladin, who now lived in Damascus, was reported to have a particular fondness for the city, but information on his early childhood is scarce. About education, Saladin wrote "children are brought up in the way in which their elders were brought up." According to his biographers, Anne-Marie Eddé and
al-Wahrani, Saladin was able to answer questions on Euclid, the Almagest, arithmetic, and law, but this was an academic ideal and it was study of the Qur'an and the "sciences of religion" that linked him to his contemporaries. Several sources claim that during his studies he was more interested in religion than joining the military. Another factor which may have affected his interest in religion was that, during the First Crusade, Jerusalem was taken by the Christians. In addition to Islam, Saladin had a knowledge of the genealogies, biographies, and histories of the Arabs, as well as the bloodlines of Arabian horses. More significantly, he knew the Hamasah of Abu Tammam by heart. He spoke Kurdish and Arabic.