On November 4 1538 he married Margaret of Austria, the illegitimate daughter of Charles V, Holy Roman Emperor. Ottavio was 15 years old, while Margaret, recently widowed by the death of Alessandro de' Medici, was 16. At first she disliked her youthful bridegroom, but when he returned wounded from an expedition to Algiers in 1541 her aversion was turned to affection.
Farnese had become lord of Camerino in 1540, but he gave up that fief when his father became duke of Parma in 1545. After the Parmesan nobility assassinated Pierluigi Farnese in 1547, troops of the Emperor occupied Piacenza. Pope Paul III attempted to regain Piacenza; he set aside Ottavio's claims to the succession of Parma, where he appointed a papal legate, giving him back Camerino in exchange, and then claimed Piacenza from the emperor — not for the Farnese, but for the Church.
Farnese attempted to seize Parma by force, and having failed, entered into negotiations with Ferrante Gonzaga. This rebellion on the part of his grandson is believed to have hastened the Pope's death on 10 November 1549. During the interregnum that followed, Ottavio again tried to induce the governor of Parma to give up the city to him, but met with no better success; however, on the election of Giovanni Maria Giocchi to the papacy as Julius III, the duchy was conferred on him in 1551.
This did not end Farnese's quarrel with the Emperor Charles V, for Gonzaga refused to give up Piacenza and even threatened to occupy Parma, so that Ottavio was driven into the arms of France. Julius III, who was anxious to be on good terms with Charles V on account of the council of Trent which was then sitting, ordered Farnese to hand Parma over to the papal authorities once more, and on his refusal hurled censures and admonitions at his head, and deprived him of his Roman fiefs, while Charles did the same with regard to those in Lombardy. A French army came to protect Parma, war broke out, and Gonzaga at once laid siege to the city. But the duke came to an arrangement with his father-in-law, by which he regained Piacenza and his other fiefs. The rest of his life was spent quietly at home, where the moderation and wisdom of his rule won for him the affection of his people.
At his death in 1586 his only legitimate son Alessandro succeeded him. He also had two other daughters: Iolanda Farnese, married to Torquato Conti (c. 1520-c. 1575) and had issue, and Ersilia Farnese (1565-1596), married to Renato Borromeo, Conte di Arona (1555-1608), first cousin of St. Charles Borromeo, and had issue.