The Daylamites lived in the highlands of Daylam, part of the Alborz range, between Gilan and Tabaristan. However, the earliest Zoroastrian and Christian sources indicate that the Daylamites originally came from Anatolia near the Tigris, where Iranian ethnolinguistic groups, including Zazas, live today. They spoke the Daylami language, a now-extinct northwestern Iranian variety similar to that of the neighbouring Gilites. During the Sasanian Empire, they were employed as high-quality infantry. According to the Byzantine historians Procopius and Agathias, they were a warlike people and skilled in close combat, being armed each with a sword, a shield and spears or javelins.
The Daylamites first appear in historical records in the late second century BCE, where they are mentioned by Polybius, who erroneously calls them Ἐλυμαῖοι ("Elamites") instead of Δελυμαῖοι ("Daylamites"). In the Middle Persian prose Kar-Namag i Ardashir i Pabagan, Artabanus V of Parthia (r. 208–224) summoned all the troops from Ray, Damavand, Daylam, and Padishkhwargar to fight the newly established Sasanian Empire. According to the Letter of Tansar, during this period, Daylam, Gilan, and Ruyan belonged to the kingdom of Gushnasp, who was a Parthian vassal but later submitted to Sasanian emperor Ardashir I (r. 224–242).
The descendants of Gushnasp were still ruling until in ca. 520, when Kavadh I (r. 488-531) appointed his eldest son, Kawus, as the king of the former lands of the Gushnaspid dynasty. In 522, Kavadh I sent an army under a certain Buya (known as Boes in Byzantine sources) against Vakhtang I of Iberia. This Buya was a native of Daylam, which is proven by the fact that he bore the title wahriz, a Daylamite title also used by Khurrazad, the Daylamite military commander who conquered Yemen in 570 during the reign of Khosrow I (r. 531-579), and his Daylamite troops would later play a significant role in the conversion of Yemen to the nascent Islam. The 6th-century Byzantine historian Procopius described the Daylamites as;
Daylamites also took part in the siege of Archaeopolis in 552. They supported the rebellion of Bahrām Chōbin against Khosrow II, but he later employed an elite detachment of 4000 Daylamites as part of his guard.
Some Muslim sources maintain that following the Sasanian defeat in the Battle of al-Qādisiyyah, the 4000-strong Daylamite contingent of the Sasanian guard, along with other Iranian units, defected to the Arab side, converting to Islam.