THE FIFTH Symphony of Dmitri Shostakovich, available in a stunning new recording by the National Symphony Orchestra and Mstislav Rostropovich (DG 2532 076; cassette 3302 076), has a background as fascinating as that of Beethoven's "Eroica." Both symphonies are musical monuments to political leaders who drastically changed the course of history and the map of Europe: Napoleon in the "Eroica," Stalin in the Shostakovich Fifth.

Whatever his ego problems, Napoleon comes out ahead in the comparison. Beethoven angrily removed the "Eroica's" dedication to Napoleon after he had himself proclaimed emperor, but at least Napoleon never tried to tell Beethoven how to write music.

The turning point in Shostakovich's career came in 1936, as his Fourth Symphony neared its premiere. He had already produced two brilliant operas: "The Nose," a striking, surrealistic satire based on a story by Gogol, and "Lady Macbeth of Mtzensk," a tale of lust and murder that some admirers consider the greatest Russian opera since Mussorgsky's "Boris Godunov." But Stalin did not think so. He attended a performance of "Lady Macbeth" early in 1936 and was appalled. What would the world think of the Soviet Union when it saw this opera? That it is a place where wives have affairs with servants and then plot to murder their husbands. Murder plots were a sore subject with Stalin. He hatched quite a few of his own and considered himself the victim of many others.

So, a few days after Stalin's fateful trip to the opera, a vicious attack on Shostakovich (and an implied warning to other Soviet composers) appeared in Pravda. And to make the point clear, another one was published shortly thereafter. Shostakovich was thunderstruck; visions of Siberia danced in his head. He withdrew his Fourth Symphony before its first performance and did not allow it to be heard during Stalin's lifetime. He also waited for Stalin's death (which was a long time coming) before producing any vocal work more controversial than a cantata on a nationwide tree-planting project. And he never wrote another opera, though his previous work indicated that he might become one of the leading opera composers of the 20th century. Above all, he set to work on his Fifth Symphony, titled "A Soviet Artist's Reply to Just Criticism."

The symphonic reply is brilliant but ambiguous, functioning (as Shostakovich himself would do for nearly all the rest of his life) on two levels, public and private. Publicly, the symphony could be given almost any sort of empty, positive-thinking title one chooses--perhaps "The New Soviet Man Triumphs Over Adversity." Privately, the music is full of the most intense anguish, liberally salted with sardonic humor and perhaps an underlying sense of confidence in his own personal worth.

In a sense, the symphony is the chronicle of an irresistible force meeting an immovable object. Stalin, backed by his secret police and concentration camps, was obviously irresistible--but deep inside, Shostakovich knew and proclaimed his own immovability.

A typical instance can be heard in the last nine measures of the second movement (one of the many passages that Rostropovich handles with unique skill and insight). After two measures of nearly complete silence, while the orchestra ponders what to do next, the oboe suggests a perky little tune that has already been played--just doing what it has already done in its own quiet, unassuming way. The bassoons are tentatively interested, though they can't really get together on what they will do. The strings are skeptical, the first violins and double basses totally aloof while the second violins, violas and cellos offer a single pizzicato note at the beginning of each measure. But the oboe is allowed to have its pretty little fantasy for four measures--18 notes. Then the entire orchestra pounces brutally on the idea, including the xylophone, which Shostakovich always wielded like a rapier--including, in fact, even the oboe itself. In a sense, the whole drama underlying this symphony is summed up in a little snippet lasting barely 10 seconds.

The NSO's performance of Shostakovich's Fifth has been one of its showcase pieces for several years, and it was recorded by Deutsche Grammophon (along with a Prokofiev program to be released later) during the orchestra's European tour last year. If it had been possible to wait a year, the still-improving NSO might have sounded even better, particularly in the violins, but it was in fine form for this recording session and responded superbly to Rostropovich's exacting leadership. Particularly notable is the work of the principal wind players--flutist Toshiko Kohno, clarinetist Loren Kitt, oboist Rudolph Vrbsky and bassoonist Kenneth Pasmanick. They are given frequent, crucial solos, and their performance places them among the finest wind players any orchestra can boast.

As for Rostropovich, he was a student and a close personal friend of the composer and he knows the nuances and ambiguities of this music as well as any man living. One could quibble (one can always quibble in music as complex as this) about various small points of interpretation, but Rostropovich sees the music clearly and in its finest details; he feels it intensely and he communicates it eloquently. There are several fine recordings of the Shostakovich Fifth on the market (Andre Previn's first recording for RCA is one; Maxim Shostakovich's another), but the newest by the NSO and Rostropovich clearly ranks among the best.

Of the two formats now available (eventually, we may expect it on a digital disc), the cassette has a richer, cleaner and more finely detailed sound.