"The 4th of June, 1989 marked a decisive victory for democracy in Poland and, ultimately, across Eastern Europe," Merkel, who grew up in communist East Germany, said in a speech to leaders from former Soviet bloc nations.
"It's a good day to remember that the 4th of June, 1989 also marked a terrible sacrifice on Tiananmen Square," she said. "We have a duty to bring the joy of freedom and democracy to others."
Hundreds, perhaps thousands, lost their lives when China's army opened fire on unarmed pro-democracy protesters in Beijing on the night of June 3-4, 1989.
At the same time, Poles were preparing to vote in an unprecedented election that led to the bloodless end of four decades of communist rule and brought the Solidarity freedom movement to power.
Vaclav Havel - the Czech ex-dissident who was to become leader of his country after Prague's communist regime fell in November 1989, only days after the Berlin Wall fell - said the lessons of two decades ago were still valid.
"We all understand how immensely important international solidarity was for us. Now it is our obligation, the obligation of our countries that experienced totalitarianism, to help those who still today are suffering under totalitarian regimes," Havel said at the ceremony.