It is believed that the village rose on the ruins of the Villa Aebutiana on the top of the hill, and the Villa became part of the Norman castle of the Prata barony. From 718 AD the territory was under the Convent of St. John and then the Monastery of Santa Maria in Cingla, then passed to the Abbey of Monte Cassino. In the Norman period there are the earliest mentions of a fortified castle called Aylanum.
In 1230 Frederick II, returning from Jerusalem, took over Ailano. From 1329 to 1381 it was a feud of the Capuano family, then until 1398 belonged to the Gaetani family. From 1399 to 1530 it came under the Capuano, the Sanframondi and the Pandone since Mariuccia Capuano married first Carlo Pandone, then on his death married Nicola Sanframondi. From 1530 to 1733 the fief of Ailano passed from hand to hand, until it came to the Pescarini family who kept it until 1806, when feudalism was abolished.
During the Risorgimento there were Carbonari groups who met in the Church of Annunziata, and in 1860 the castle was home to some patriots who were planning to free the Terra di Lavoro from the Bourbons. During the Second World War, for its strategic position behind the hills, the area was occupied by the Germans and the inhabitants were displaced for a period.