The Union of Soviet Writers today ended five days of debate over censorship and the future of Soviet literature at its eighth congress, and elected 64-year-old Vladimir Karpov, editor-in-chief of the leading literary journal Novy Mir, as its new head.

Georgy Markov, 75, Karpov's predecessor as first secretary of the 10,000-member union, was appointed to the largely ceremonial role of chairman. Markov collapsed during his opening speech at the congress Tuesday, prompting excited speculation in the ranks of attending writers that he would be replaced.

Markov was elected in 1971 and is closely identified with the Leonid Brezhnev era of cultural orthodoxy.

Karpov's election by secret ballot late last night followed various calls from the podium for censored writers to be published and for greater democracy in the union.

Poet Andrei Voznesensky, in a speech Thursday, complained of books "pared down by editors," according to excerpts of his remarks released by the Soviet news agency Tass. He also called for the early publication of the complete works of Boris Pasternak, Anna Akhmatova, Vladimir Mayakovsky and Sergei Yesenin, Tass reported. Some works by all four have been banned here.

"People want openness," Voznesensky was quoted as saying. The 53-year-old poet has swung in and out of official favor during his colorful career.

Controversy continues to shroud the reputations of the four deceased writers he mentioned. In a press conference last March, Markov said that Pasternak's novel "Doctor Zhivago," never published in the Soviet Union, would not be published "very soon." And the official Communist Party newspaper Pravda, in its report of Voznesensky's speech, left out even his mention of the four names.

Addressing the 600 congress delegates on Thursday, poet Yevgeny Yevtushenko also mentioned the names of "many" literary figures who should be recognized, Pravda reported, but the newspaper gave none of the names.

In a defense of the role of writers here, Yevtushenko said of socialist democracy: "We should put it into practice ourselves."

Yevtushenko provoked a literary and political storm here when he railed against Stalinism and censorship in a speech last December.

"Some people tried to intimidate us by allegations that democracy would inevitably lead to anarchy," he said on Thursday. "Everything depends on who is holding the steering wheel. It is in reliable hands today, and our hands, the hands of the writers, should also be on the steering wheel."

The choice of Karpov, according to some literary figures in the Soviet capital, was a compromise between progressive forces who favored a maverick and others who backed the old guard. In making it, the union bucked a trend of sweeping changes that began when Mikhail Gorbachev came to power in March 1985 and continued through last month when controversial director Elem Klimov became head of the film makers' union.

Karpov was imprisoned while a military cadet for referring to the cult of personality built up by Joseph Stalin. A prose writer who specialized in books about World War II, he became head of Novy Mir, a popular literary journal, in 1981.