Trivulzio was born in Milan, where he studied, among the others, with Galeazzo Maria Sforza. In 1465, he followed the latter's army in France to help King Louis XI of France. He also took part in the Milanese campaigns against Bartolomeo Colleoni and fought alongside Federico III da Montefeltro in the wars in Romagna.