MOSCOW, NOV. 13 (FRIDAY) -- Soviet leader Mikhail Gorbachev, in a bitter speech explaining this week's ouster of his top ally Boris Yeltsin, accused the capital's former party boss of being personally ambitious and immature, according to a text released early today by the official Soviet news agency Tass.

The harsh statement about the 56-year-old Yeltsin, one of the most fervent supporters of Gorbachev's program, was delivered at a meeting Wednesday of the Moscow city Communist Party committee that led to Yeltsin's removal for "major political errors."

A chief error was a "politically immature" speech to the party's Central Committee on Oct. 21, in which Yeltsin "sought to put in question the party's work on restructuring . . . and went as far as to say that restructuring was giving virtually nothing to the people," Gorbachev said.

"Boris Yeltsin had placed personal ambitions above the interests of the party," Tass quoted Gorbachev as saying. The report said Yeltsin, an alternate member of the ruling Politburo, had been reprimanded before for such behavior and had promised to mend his ways. "However, he did not do that," Tass said.

The Tass report, released for publication in today's newspapers, gave a dramatic account of the recent events that produced the first major political crisis under Gorbachev's leadership. Until now, the Soviet press has given no reasons for Yeltsin's removal except to cite unspecified "major shortcomings."

In addition to Gorbachev's comments, Tass also carried an account of the debates at Wednesday's Moscow party meeting and Yeltsin's confession.

Tass said Yeltsin told the Moscow gathering that he had "lost face" as a Communist Party leader. He said he was "very guilty" of letting down the city party organization and "very guilty before Mikhail Sergeyivich Gorbachev, whose prestige in our organization, in our country and in the whole world is so high."

"One of my most characteristic personal traits, ambition, has manifested itself lately . . . . I tried to check it but regrettably without success," Yelstin was quoted as saying.

Unnamed participants at the Moscow gathering this week accused Yeltsin of a variety of faults, from a high-handed administrative style and a lack of openness in personnel decisions to "ultra-left and extra-radical declarations," Tass said.

Several speakers said Yeltsin was guilty of "political adventurism" and accused him of trying to place the Moscow party organization "in opposition to the Central Committee and splitting the Politburo." They also cited him for "the same big-boss syndrome" he so frequently condemned in others.

In his apology, Yeltsin seemed to retract the suggestion that the reform process was stalling. "I am absolutely confident about restructuring and that, whatever difficulties it might pass through, it will win all the same," he was quoted as saying.

Gorbachev underlined the seriousness of the Yeltsin affair, saying it should not be forgotten. "This is a lesson for the Central Committee, too," he said.

Gorbachev said some aspects of life in Moscow, traditionally the most privileged of Soviet cities, had even worsened under Yeltsin's leadership. Management of the capital, with more than 9 million inhabitants, and the vast party organization, with 1.2 million members, was "beyond his powers," Gorbachev said in opening remarks at the Moscow party gathering.

Yeltsin's ouster was widely viewed here as a setback for Gorbachev and for the backers of reforms. Yeltsin, who became boss of the powerful Moscow organization in December 1985, was one of the most outspoken proponents of Gorbachev's program. His frank, hard-hitting speeches were seen as products of the new openness now allowed in public debate.

The ouster was seen as an affirmation of a more centrist course in the pursuit of reforms and a reminder of the iron law of party discipline, at the expense of glasnost, or openness.

At the Oct. 21 session, Yeltsin apparently launched a vehement attack on colleagues on the Politburo and in the leadership for slowing the reform process in Moscow. He also criticized the current "style of leadership," which many interpreted as oblique criticism of Gorbachev.

Gorbachev's remarks focused mainly on the Oct. 21 speech, in which Yeltsin offered to resign. According to the Tass account, Gorbachev had advised Yeltsin not to bring the matter up until after the Nov. 7 celebrations of the 70th anniversary of the Bolshevik Revolution. The Oct. 21 plenum had been called to review Gorbachev's anniversary speech. In doing so, Yeltsin breached party ethics and circumvented the Politburo, Tass said.

Gorbachev called Yeltsin's comments "politically immature, extremely confusing and contradictory," Tass said. He said the Moscow party chief sidetracked the Central Committee's work, "proclaiming his special position on a number of questions."

The speech caused "perplexity and indignation" among the 300-odd members of the Central Committee, Tass said. "Not one of the speakers supported Boris Yeltsin."

The report quoted Gorbachev disputing Yeltsin's assessment that "restructuring" or perestroika has failed to produce results for the people. Gorbachev noted improvement in agriculture, the rate of housing construction and new funding for health care.

Gorbachev dimissed as "absurd" Yeltsin's charge that he was not getting support from the Central Committee Secretariat, the administrative core of the party apparatus.