"Nagasaki, together with Hiroshima, will continue to make the utmost efforts until the world gets rid of all nuclear weapons," he said.
A record 32 countries were in attendance.
While the US for the first time sent a delegation to Friday's memorial ceremony in Hiroshima, no representative was present at the Nagasaki anniversary.
No US apology
The US' World War II allies Britain and France, both declared nuclear powers, had sent their diplomats for the first time to Friday's ceremony in the western Japanese city, in a sign of support for the goal of nuclear disarmament.
The British and French delegations, as well as an envoy from Israel, also attended the Nagasaki ceremony for the first time.
Ban Ki-moon, the UN secretary-general, visited Nagasaki a day before the Hiroshima anniversary, where he attended the ceremony also for the first time as the UN chief.
He is leading an initiative for an international convention to outlaw nuclear arms.
Nagasaki was devastated by a plutonium bomb nicknamed "Fat Man", which claimed tens of thousands of lives instantly or days later due to burns and radiation sickness.
"Little Boy", a four-tonne uranium bomb, detonated over Hiroshima, killing an estimated 140,000 people.
The United States has never acceded to demands in Japan for an apology for the loss of innocent lives in the atomic bombings.