In the Roman times the city of Peqin was known by the name of Clodiana, an Illyrian-inhabited territory. The foundations of the castle are thought to date from the Roman period, the time of the construction of the Via Egnatia. Its walls at one point had a height of around 12 metres. The castle was later rebuilt and expanded during the Turkish occupation of Albania, at which time it was passed into the control of the Sipahi (lord) of the local fief, who added a palace and a harem. The last resident of the castle was Demir Pasha.
The castle was equipped with subterranean tunnels which served as exits several km away from the city in difficult times. Similarly, clay pipes have been found in the walls of the castle, which archaeologists believe is an indication that water was supplied from outside the castle during wartime.
Doune Castle was originally built in the thirteenth century, then probably damaged in the Scottish Wars of Independence, before being rebuilt in its present form in the late 14th century by Robert Stewart, Duke of Albany (c. 1340–1420), the son of King Robert II of Scots, and Regent of Scotland from 1388 until his death. Duke Robert"s stronghold has survived relatively unchanged and complete, and the whole castle was traditionally thought of as the result of a single period of construction at this time. The castle passed to the crown in 1425, when Albany"s son was executed, and was used as a royal hunting lodge and dower house.
In the later 16th century, Doune became the property of the Earls of Moray. The castle saw military action during the Wars of the Three Kingdoms and Glencairn"s rising in the mid-17th century, and during the Jacobite risings of the late 17th century and 18th century.