Castel d'Aiano (Medial Mountain Bolognese: ) is a comune (municipality) in the Metropolitan City of Bologna in the northern Italian region of Emilia-Romagna, located about 35 kilometers southwest of Bologna.