Castel d'Aiano (Medial Mountain Bolognese: Castèl d'Ajàn) is a comune (municipality) near Bologna in the northern Italian region of Emilia-Romagna. It is located about 35 kilometres (22 mi) southwest of Bologna.