He was a chorister in the Chapel Royal until his voice broke in 1673, and he was then made assistant to John Hingeston, whom he succeeded as organ maker and keeper of the king's instruments in 1683. In 1677 he was appointed composer-in-ordinary for the king's violins and in 1679 succeeded his teacher, Blow, as organist of Westminster Abbey. It was probably in 1680 or 1681 that he married. From that time he began writing music for the theatre. In 1682 he was appointed an organist of the Chapel Royal. His court appointments were renewed by James II in 1685 and by William III in 1689, and on each occasion he had the duty of providing a second organ for the coronation. The last royal occasion for which he provided music was Queen Mary's funeral in 1695. Before the year ended Purcell himself was dead; he was buried in Westminster Abbey on 26 November 1695.
Purcell was one of the greatest composers of the Baroque period and one of the greatest of all English composers. His earliest surviving works date from 1680 but already show a complete command of the craft of composition. They include the fantasias for viols, masterpieces of contrapuntal writing in the old style, and some at least of the more modern sonatas for violins, which reveal some acquaintance with Italian models. In time Purcell became increasingly in demand as a composer, and his theatre music in particular made his name familiar to many who knew nothing of his church music or the odes and welcome songs he wrote for the court. Much of the theatre music consists of songs and instrumental pieces for spoken plays, but during the last five years of his life Purcell collaborated on five 'semi-operas' in which the music has a large share, with 'divertissements', songs, choral numbers and dances. His only true opera (i.e. with music throughout) was "Dido and Aeneas", written for a girls' school at Chelsea; despite the limitations of Nahum Tate's libretto it is among the finest of 17th-century operas.