He also paid tribute to ethnic and religious groups deported to Kazakhstan from other parts of the Soviet Union under Stalin.
The visit has taken on a new significance since last week's attacks on the United States, as Kazakhstan borders on several Central Asian countries which could be caught up in any military action against Afghanistan.
The Pontiff has made no direct reference to the crisis but called for peaceful negotiation to settle conflicts.
"Conflicts must be resolved not by force but by peaceful negotiation and dialogue," he said on arrival on Saturday, in an address devoted to Kazakhstan's history as a testing-ground for Soviet nuclear weapons.
The Pope is due to spend four days in Kazakhstan before travelling on to the Caucasus, for a visit to Armenia.
Dark past
The Pope mentioned the hundreds of thousands of Russians, Germans, Poles, Chechens and Ukrainians, among them a tiny community of Catholics, sent into exile by Stalin.
"I know your history, that suffering which many of you were subjected to when the totalitarian regime tore you away from your native land and deported you here," he said.
The 300,000-strong Catholic population of Kazakhstan is tiny compared to the country's six million Russian Orthodox Christians or the eight million-strong Muslim community.
And predictably fewer people turned out for the mass than forecast.
But he still attracted over 20,000 people, the biggest crowd to gather in Astana since independence.
No reassurances
A Vatican spokesman said he had no knowledge of any reassurances from the US that no military action would take place during the Pope's scheduled visit, contrary to earlier reports.
"Washington has not given any guarantees on this subject to the Holy See which, moreover, has not sought them," papal spokesman Joaquin Navarro Valls said.
Mr Nazarbayev thanked the 81-year-old church leader for going ahead with the visit despite the tension over Afghanistan.
"Today like no other there is a need for dialogue between the Muslim and Christian world," the president said.