Following musical studies in his native town, Pergolesi was sent to Naples in the early 1720s. He continued his studies at the Conservatorio dei Poveri di Gesu Cristo, where he also performed as a violinist, also making his debut as a composer. In 1731, Pergolesi received his first commission to compose an opera, which means that he had probably left the conservatory around that time. By early 1732, Pergolesi had composed two operas, which met with minimal success. That year, he became maestro di cappella to Prince Ferdinando Colona Stigliano, a prominent Neapolitan nobleman. Pergolesi's opera Lo frate 'nnamorato was performed, greeted with immense enthusiasm.
In 1733, Pergolesi was commissioned to write an opera for the celebration of the birthday of the Empress of Austria. Performed in 1733, this opera, Il prigioner superbo, contained a two-act intermezzo, La serva padrona, which eventually gained extraordinary popularity as a separate work. When Carlos de Bourbon entered Naples in 1734, re-establishing, with the support of Spanish troops, the Kingdom of Naples, Pergolesi was asked to write a mass. He compose d his Mass in F, which was performed in Rome, eliciting considerable interest. Pergolesi was now maestro di cappella to another Neapolitan nobleman, the Duke Maddaloni.
The success of his Mass brought Pergolesi another commission: an opera, L'Olimpiade, for the 1735 Carnival season in Rome. The opera was a failure; fortunately, Pergolesi's last stage effort, Il flaminio, a comedy, was successfully produced in Naples. In 1736, Pergolesi, suffering from tuberculosis, moved to the Franciscan monastery in Pozzuoli. During his final year, he composed the Stabat Mater, which contemporaries lauded as a successful introduction of the new galant style into the traditional domain of church music.
Pergolesi's Stabat Mater was first published in London, in 1749, eventually becoming the most frequently printed musical composition in the eighteenth century. La serva padrona, based on a story about a witty servant girl who plots to marry her elderly master, enjoyed great success in Europe following Pergolesi's death. In 1752, a performance of this work in Paris sparked the famous Querelle des Bouffons (Quarrel of the Comedians), the dispute between the supporters of Italian opera and the patriotic traditionalists, who favored French opera. During this dispute, La serva padrona was upheld as representative of the Italian operatic genius. Eighteenth century critics, as well as ordinary listeners, admired the opera's brilliant characterization and masterful plot development. Admired in the eighteenth century, this concise stage work, which possesses a timeless charm, has been appreciated by generations of listeners.