Born into a noble family in Milan, he studied law, philosophy and theology at the University of Pavia.
After a short stay in Mantua, he decided to enter the Knights Hospitaller in 1505 aged only twenty-five.
He collected books, sculptures and artworks, founded a free public school for poor children and opened a pilgrims' hospice.
In 1533 he commissioned Girolamo da Treviso to decorate the church's main apse with a fresco of The Madonna Enthroned between Saints Mary Magdalene and Catherine of Alexandria.
In 1554 he also commissioned a monochrome fresco from Francesco Menzocchi, an artist from Forlì - it showed St Joseph presenting Castiglione himself, now an old man, to the Virgin Mary.