Castello d'Agogna is a small town and comune (municipality) in the Province of Pavia in the Italian region Lombardy, located about 45 km southwest of Milan and about 35 km west of Pavia. It is crossed by the Agogna river. Castello d'Agogna borders the following municipalities: Ceretto Lomellina, Mortara, Olevano di Lomellina, Sant'Angelo Lomellina, Zeme. In the Middle Ages the village belonged to the abbey of Santa Croce di Mortara, and in 1387 it became a fief of the lords of Robbio. Later it was part of the Duchy of Milan. In 1713 it became part of the Duchy of Savoy, and in 1859 was included in the province of Pavia.