MOSCOW, Jan. 15— As they continue exposing Stalin's repressions and trying to correct the many distortions of official history, historians and journalists here have begun to sketch a clearer picture of a complex figure whose role in setting up Soviet power was blotted out for 60 years: Leon Trotsky.

What emerges, as researchers begin to scratch beneath the now discredited version of history that Stalin left to posterity to reveal what lies underneath, is far from a rehabilitation of Trotsky or his ideology of permanent revolution.

But in the new version, Trotsky is no longer the traitor, subversive provocateur, and spy that Stalin's propaganda made him out to be. The new history describes his close relationship to Lenin after the Bolsheviks seized power in 1917, and his contributions as War Commissar in building the Red Army and winning the Civil War from 1918 to 1920.

It also portrays him as a man later blinded by personal ambition to succeed Lenin, spinning out unrealistic theories of ''permanent revolution'' that in the end played into Stalin's hands instead. The Crime of 1940

And almost every Soviet writer and historian now generally accepts the view that it was Stalin himself, not Lavrenti Beria, who ordered Trotsky's assassination. On Aug. 20, 1940, a Spanish Communist named Ramon Mercader smashed a mountain-climber's ax into Trotsky's skull in Coyoacan, a suburb of Mexico City. He died the next day.

None of this comes as news to Western historians, or independent-minded Soviet historians and writers long aware of the facts. As with the recent revelations of Stalin's vast crimes, what is happening is that ordinary Soviet people are now being allowed to learn things long suppressed. The historical truth is a weapon for the Gorbachev policy of economic restructuring - the necessary dialectical foundation for his attempt to replace the economic and social system Stalin put in place 60 years ago with a new system more in tune with modern times.

Adam B. Ulam, professor of government at Harvard University, said: ''Trotsky is no longer the evil spirit of Russian history. He's simply a political leader who held rather unacceptable views in many ways.''

As Professor Ulam noted, the treatment given to Trotsky is not at all like the nearly complete rehabilitation accorded to another of the early revolutionary leaders, Nikolai I. Bukharin, whose ideas about how to develop the Soviet economy were more like Mikhail S. Gorbachev's than Stalin's. ''They're having a modest personality cult with Bukharin,'' Professor Ulam said. Was Trotsky a Prophet? ''Before, Trotsky was just blacked out,'' Professor Ulam said. ''It's acknowledged now that Trotsky was War Commissar. But mainly his story is being used to dump on Stalin.''

The most recent assertion that Stalin ordered the assassination was published in the weekly Literaturnaya Gazeta on Jan. 4. The journal even named the Soviet secret police agent who provided $5,000 and a false passport to the assassin - a colonel of the N.K.V.D. named Leonid Eitingon, who used the pseudonyms Leontyev and Rabinovich.

''Contemporary Trotskyists try to portray Trotsky's calls for a 'second revolution' in the U.S.S.R. as prophetic, considering the present policy of restructuring as the embodiment of a program of political revolution,'' the article by the historian Nikolai A. Vasetsky said.

''But restructuring, first of all, means the elimination of deformation and distortion from the Leninist conception of socialism,'' the article went on. ''The Trotskyist program became, in the end, just a political game. In his struggle with Stalin, Trotsky tried to replace one ''ism'' - Stalinism - with another ''ism'' equally harmful to Leninism - Trotskyism.'' A Relentless Ambition

Dr. Vasetsky's article, and one published in Pravda last Sept. 9 by Col.-Gen. Dmitri Volkogonov, agreed that it was not Trotsky's ideological errors, as Stalin later asserted, but Trotsky's relentless ambition and constant calls to bring down Stalin that were the driving force of the clash between the two.

In General Volkogonov's words: ''Trotsky, in the years when he was active in the party (1917-1924), was not an enemy of the revolution or of socialism. But he was the enemy of Stalin. The source of his tragedy lay not so much in his struggle with Stalinism as in his struggle with Stalin for power.''

Roy A. Medvedev, the Marxist historian who was thrown out of the Communist Party in 1969 for exposing Stalin's misdeeds 20 years before it became officially permissible to do it, said:

''You have to realize that one reason for the surge in articles about the figures of the past is that now there is no generally recognized official history. The old textbooks were full of 'white spots' - omissions - and known to be false. For that reason, we couldn't hold examinations in history courses last summer. Unless you know about Trotsky, you can't write the history of the October Revolution or the Civil War -so it's a requirement of this new stage in the development of our ideology,'' he said.