Ban, who is scheduled to meet next week with Iran's President Hassan Rowhani, made the remarks after what he said was a "very good meeting" with Iranian Foreign Minister Mohammad Javad Zarif.
"I told Minister Zarif that I commend the efforts of the new government in Iran in promoting dialogue with the international community," he said.
"I also praised the government's actions in releasing 12 political prisoners yesterday, including the human rights lawyer, Ms Nasrin Sotoudeh, as well as a number of women's rights activists, political activists and journalists," he said.