When he was a young man, Metatstasio worked as lawyer in Naples. In those days, Naples was famous for its music and its beautiful opera houses. In Naples, Metastasio took music lessons from the Italian composer, Nicola Porpora. He liked to sing and to play the harpsichord. He sometimes composed his own music too. He also made money by writing poems for famous people's weddings and birthdays. He wrote his first opera libretto in 1724. It was called "". It told the story of Queen Dido and her love for Aeneas, a Trojan prince. It was a great success. He stopped working as a lawyer and made all his money by writing librettos and poems. Soon, he was famous all over Italy for his librettos. Charles VI, Holy Roman Emperor asked Metastasio to come to Vienna to work as his poet laureate. In March 1730 Metastasio went to Vienna. He lived there for the rest of his life. He wrote many more opera librettos for the emperor's theatre. After the emperor died, Metastasio worked for the emperor's daughter Maria Theresa of Austria.