Just back from a trip to Leipzig in the early autumn of 1950 where he heard Bach's Well-Tempered Clavier at the Bicentennial Bach Competition played by the Russian pianist Tatiana Nikolaeva, Shostakovich began his own series of 24 Preludes and Fugues, Op. 87, based on Bach's model. He composed them quickly, starting on October 10, 1950, and finishing on February 23, 1951.
While his work would pay homage to Bach, Shostakovich's work would have several fundamental differences. First, the order of the individual pieces would be organized around the circle of fifths with a prelude and fugue in the relative minor following each major key piece rather than in ascending semi-tonal order of Bach's work. Second, Shostakovich's pieces would be composed in order -- that is, C major - A minor followed by G major - E minor followed by D major - B minor -- and, more significantly, this order would have a sort of subliminal narrative sub-text, taking the music from the "innocent" tonal world of the C major Prelude and Fugue to the profound and sublime severity of the concluding D minor Prelude and Fugue. Finally, Shostakovich's work, although conservative in its counterpoint and harmony -- that is, there are no examples of invertible or reversible themes or counterpoint and the pieces are for the most part recognizably tonal in language -- is still clearly the work of a modernist composer; his counterpoint and harmony may be conservative but the emotional and spiritual worlds of the preludes and fugues is at once sincere and ironic. The result is a work which can not only stand comparison with Bach's Well-Tempered Clavier, it is both Shostakovich's masterpiece for the piano and one of the contrapuntal masterpieces of the twentieth century.