The original nucleus of Agliè (Ajé in Piedmontese), built on the ruins of the ancient Roman city of Alladium, was probably located on the hills in Madonne delle Grazie, was mentioned for the first time in 1019. At the time Agliè was a castle, built to defend Macugnano. The current name appears instead in 1141, when the feudal lords of the Canavese divided the territory and the village passed under the control of the San Martino di Rivarolo and Agliè.
In 1386 the peasants around the village gave rise to a revolt, remembered with the name of Tuchinaggio, and violently cut off by Amedeo VII of Savoy, also called Conte Rosso. Perhaps thanks to his good governance, Aglie did not take part in this rebellion. Agliè was involved in the struggles between the Guelphs of San Martino d'Agliè and the Ghibellines of the Counts of Valperga. In 1391 thanks to the Savoy peace came. The Alliadese asked their lords, the Counts of Agliè, some concessions and privileges obtaining them thanks to the loyalty shown to their feudal lords at the time of Tuchinaggio. Later in 1448 the municipal statutes were granted. After the mid-sixteenth century, Aglie also had to suffer the consequences of the war between Savoy and France.
Peace came in 1561, when the Counts of Agliè swore loyalty to the Duke Emanuele Filiberto of Savoy. The seventeenth century saw the appearance on the historical scene a very important figure for the country, Filippo San Martino di Agliè, to whom we owe the restoration and expansion of the castle of Agliè. After the death of Philip, which took place in 1667, it is necessary to wait about a century before the enlargements of the castle are completed, which we can still admire today. In 1796 the village was invaded by the French and the castle was looted. In 1825 Carlo Felice came into possession of the castle and entrusted its restoration to the architect Borda di Saluzzo, who also built the small internal theater.
The ducal castle of Agliè is one of the main attractions of the village, together with Villa Il Meleto, which was the summer residence of the poet Guido Gozzano.