The possibilty of being able to spell the surname Bach in this way comes about because in German B indicates what in English is called B flat, while H indicates what in English is called B natural.
This four-note motif has been used by a number of composers, most usually as a homage to Johann Sebastian Bach. The first known example, however, is in a piece by Jan Pieterzoon Sweelinck. It is possible, though not certain, that he used it in homage to one of Johann Sebastian's ancestors, many of whom were themselves musicians.
J. S. Bach himself used it as a fugue subject in the final part of Die Kunst der Fuge (around 1750), a work he did not complete before he died. It appears in passing in several of his other pieces, such as at the end of the fourth of the canonic variations on "Vom Himmel Hoch", BWV 769. Its appearance in the penultimate bar of the Kleines harmonisches Labyrinth, BWV 591, is not thought to be very significant and the work may even be spurious (Johann David Heinichen has been suggested as a possible composer). In many pieces, while the exact notes B-A-C-H are not played, a transposition of the motif is used (a note sequence with the same intervals: down a semitone, up a minor third, down a semitone).
A fugue for keyboard in F major by one of Bach's sons, probably either Johann Christian Bach or Carl Philipp Emanuel Bach, exists using the motif, but it was not until the 19th century when interest in Bach was revived that the motif began to be used with any regularity.
Perhaps because it was used by Bach himself in a fugue, the motif is often used by other composers in fugues or other complex contrapuntal writing.
Works which prominently feature the BACH motif include:
Other signature motifs include: