During Mamluk times, Dayr al-Shaykh was home to one of the most famous local dynasties of local religious Shaykhs in the area. The founder was al-Sayyid Badr-al Din Muhammed who came to Palestine either from Iraq, Khurasan, or the Hijaz. He first settled in Shuafat, but after the death of one of his daughters, whose tomb can still be seen in the village, he moved westwards. According to the Mamluk-era historian Mujīr al-Dīn al-'Ulaymī, Badr-al Din probably arrived in Palestine around 1229-1244, and eventually he settled at Dayr al-Shaykh. According to the same source, Badr-al Din was a man of great virtue, with a reputation of being close to God. He died 1253, and was buried at his zawiya at Dayr al-Shaykh. Because of him, Dayr al-Shaykh attracted many disciples and other people who came for ziyara. Badr-al Din had eight sons; the oldest, al-Sayyid Muhammed, is also described as a guide and leader. Abd al-Afiz, another of his sons to attain leadership status, returned to Jerusalem to a village that was subsequently renamed Sharafat for this family of Ashraf.
Ottoman period
Dayr al-Shaykh, like the rest of Palestine, was incorporated into the Ottoman Empire in 1517, and according to an Ottoman census of 1596, the village had a population of 26 households and 3 bachelors, an estimated 113 person. All were Muslim. The village was a part of the nahiya of Jerusalem which was under the administration of the liwa of Jerusalem. The villagers paid a fixed tax rate of 16,6% on wheat, barley, olives, fruits, beehives, goats, and vineyards, a total of 3,300 akçe. In 1834, when Ibrahim Pasha of Egypt led the Egyptian army into Palestine, he confiscated large areas of land once belonging to local leaders in the process. However, according to local tradition, when Ibrahim Pasha sent a regiment to confiscate the land of Dayr al-Shaykh, it was attacked by a swarm of bees. According to tradition, this was Shaykh Badr defending his abode. In 1838, Deir esh-Sheik was noted as a Muslim village in the al-Arkub district, southwest of Jerusalem, while in 1856 the village was named D. esh Sheikh on the map of Southern Palestine that Heinrich Kiepert published that year. An Ottoman village list of about 1870 found 28 houses and a population of 101, though the population count included only men, while the population grew to about 400 by the early 1870s. However, the village was described as deserted by 1883. Palestinian historian Walid Khalidi writes that the inhabitants might either have migrated elsewhere for a temporary period or died during the typhus epidemic that swept the area in 1874. However, according to P.J. Baldensperger, writing in 1894, Sheikh Ethman, a direct descendant of Shaykh Badr, was partly a resident of Artas, partly of Dayr al-Shaykh, from 1874-1882. Sheikh Ethman, described in 1894 as a man about 50, with "fine features, tall, and very sober in speech", wore a green turban as a symbol of his descent from Husayn. He had been greatly revered by everybody until an incident in 1881, involving the escape of a criminal, had left his reputation diminished. In 1896 the population of Der esch-schech was estimated to be about 135 persons.
Along with all of Palestine, Dayr al-Shaykh became part of the British Mandate in 1920 following the region's capture from the Ottoman Turks by Great Britain. In the 1922 census of Palestine Dayr al-Shaykh had a population 99, all Muslims, increasing in the 1931 census to 156 inhabitants, in 26 houses; 148 Muslims, seven Christians, and one Jew were counted. In the 1945 statistics the population reached 220; 210 Muslims and 10 Christians. Most of the residents' houses were built from stone. There were a few shops in the village and a well to the west provided drinking water. Most of its cultivable land was used for grain, vegetables and fruit trees. Large swathes of land to the east, west and north of Dayr al-Shaykh were covered by olive groves. The village had two mosques. Within the village lay the tomb and mosque of Shaykh Sultan Badr. In 1944-45, the village had 1,025 dunums of land used for cereals, while 291 dunums were irrigated or used for orchards.
1948, and afterwards
Dayr al-Shaykh was depopulated during the 1948 Arab-Israeli War. The village was occupied by Israel's Har'el Brigade, probably on October 21, 1948 during Operation ha-Har. No Jewish locality was built on village lands which amounted to 6,781 dunams in 1945. The mosque of Shaykh Sultan Badr remains and is currently a tourist attraction. The Israeli town of Nes Harim is located southwest of the village site, on land formerly belonging to Bayt 'Itab. Andrew Petersen, an archaeologist specializing in Islamic architecture, surveyed the shrine in 1994. The shrine consists of four main structures: a courtyard, a prayer hall, a maqam and a crypt. His conclusion was that the complex evolved over several hundred years, but that the oldest part is the vaulted crypt. This crypt, with the entrance in the south-east corner of the courtyard, has pointed arches which indicate a medieval, possibly Crusader date. The maquam belongs to a second phase of constructions, probably built shortly after the death of Sheik Badr in the 13th century. The prayer hall, which is located in the south-west corner of the complex, is the largest building and was probably constructed during late Mamluk, possibly early Ottoman times.