He initially opted for a career as a diplomat, working as the imperial secretary of the Italian legation to the court of Charles VII where he became a favourite of the emperor.
[3] Migliavacca made his debut as a librettist in his own right (albeit closely supervised by Metastasio) in 1750 with Armida placata, composed by Giovanni Battista Mele [it] and performed in Madrid to celebrate the marriage of Maria Antonia Ferdinanda of Spain and Victor Amadeus III of Sardinia.
It was performed again in Vienna later that year in a pastiche version with music by several composers including Luca Antonio Predieri and Johann Adolph Hasse.
[2] It premiered at the court theatre in Dresden in a spectacular production that included live elephants and camels and hundreds of extras in addition to the seven main singers.
[8] When the 1756 Prussian invasion of Dresden severely curtailed the musical life of the court, Migliavacca worked in Vienna and then returned to Milan in 1765.
During his sojourn in Milan he was instrumental in negotiating the Biblioteca Ambrosiana's acquisition of two valuable book collections belonging to the Clerici and Lambertenghi families.
His last known libretto from that period was La reggia d'Imeneo, a festa teatrale performed in Dresden in 1787 to celebrate the marriage of Anton of Saxony.