MOSCOW, NOV. 29 -- In a rare moment of personal reflection, Soviet President Mikhail Gorbachev said at a meeting broadcast here tonight that his grandfather had been jailed for 14 months during the Stalinist purges.

Although Gorbachev has confided before to friends and Communist Party colleagues that one of his relatives had been sent to one of Stalin's prison camps in the 1930s, his comments before a televised gathering of artists, editors and writers was his first public mention of what must surely been a formative experience in his childhood.

"We have seen everything," Gorbachev said sadly, talking about the painful, common experience that "all of us" have gone through in the Soviet Union. Gorbachev's paternal grandfather, Andrei, was released from prison in 1938 when Stalin had his secret police chief, Nikolai Yezhov, executed and replaced by Lavrenti Beria. Millions died during the purges of the '30s.

Gorbachev, who grew up in the southern Russian village of Privolnoye, is 59, a member of the generation shaped by Nikita Khrushchev's decision in 1956 to expose the crimes of the Stalin era. Stalin died in 1953. Gorbachev's changes represent the dismantling of Stalin's legacy.

Gorbachev also recalled how as the party leader of the city of Stavropol during the era of Leonid Brezhnev, Gorbachev met in the resort town of Pitsunda with a Georgian politician named Eduard Shevardnadze, who is now foreign minister.

"We were certainly not kids any longer at this point," Gorbachev said, describing how the two men talked, with some reserve, about the perilous direction their country had taken.

"We knew then," Gorbachev said, "that we could not live this way anymore."