The founder of the Sforza dynasty was Muzio Attendolo Sforza (1369-1424). The son of a peasant family, he became a successful condottiere, a professional soldier for hire. In the course of his career, he fought for many employers, including the Visconti family, who ruled the city of Milan. When Muzio died in battle, his son Francesco (1401-1466) succeeded him as commander of his troops. While employed by Queen Giovanna of Naples, he left to fight for the Visconti against the Venetians. He was dismissed when the Visconti grew suspicious of his loyalties. But they soon needed him back, and as an inducement, he was promised the Visconti heir, Bianca Maria, as his wife. Mutual distrust still prevailed between Francesco and his future father-in-law, Filippo Maria, and it was years before the marriage took place. When Filippo died, Francesco wanted Filippo's dukedom. He ended up laying siege to Milan, which surrendered to him in 1450. He became a highly respected duke. He had numerous illegitimate children, as well as four children by Bianca Maria.
Francesco was succeeded by his son Galeazzo Maria, a cruel and dissolute ruler who was assassinated in 1476. Galeazzo Maria's heir, Gian Galeazzo, was only eight years old at the time, and it was Galeazzo Maria's brother Ludovico who finally controlled Milan after the resulting power struggle. Although he was supposedly Gian Galeazzo's guardian, Ludovico refused to give up power when Gian married Isabella of Naples in 1489, and a feud with Naples ensued. Ludovico began courting the French king, Charles VIII, who had claims to Naples, in the hope that Charles would put an end to his troubles with Naples and with rival Venice. When Gian Galeazzo conveniently died soon after Charles' invasion in 1494, Ludovico become the uncontested ruler of Milan.
However, Ludovico soon found that he had made a serious mistake by encouraging the French invasion, because the Duke of Orleans, who would later become King Louis XII, had accompanied Charles to Italy and claimed Milan as his own because of his relationship to the Visconti family. Ludovico joined Pope Alexander VI and the other Italian powers to push Charles out of Italy. Louis XII returned to Milan and forced Ludovico to flee in 1499. Ludovico returned to power briefly in 1500, but was betrayed and taken prisoner by the French a few months later. He died in a French castle in 1508. After the departure of the French, the Sforza family ruled Milan with some interruptions until 1535.
Machiavelli mentions Ludovico with undisguised contempt, regarding him as one of the primary causes of Italy's misery. Ludovico was a plotter and intriguer, constantly making alliances and counter alliances that he imagined would propel him to greatness. He was ultimately undone by forces too powerful for him to manipulate. He was also a great patron of the arts. Leonardo da Vinci was in his employ at Milan for several years, and it was Ludovico who commissioned the painting of da Vinci's "Last Supper" for his favorite church.