In 1503 he fought for Cesare Borgia and soon after shifted to the service of Guidobaldo da Montefeltro, Duke of Urbino.
He took part in several battles and became one of the most influential men at the ducal court, befriending Pietro Bembo.
He was counsellor to the duke and his successor Francesco Maria I Della Rovere and was a witness at the time of the latter's adoption as Guidobaldo's heir.
On Guidobaldo's death in 1508 Pope Julius II chose Cesare as his ambassador to the new duke of Urbino.
In 1509 he was put in command of the papal army in Romagna in its campaign against the Republic of Venice.