He made the announcement following talks with UN chief Ban Ki-moon in Burundi’s capital, Bujumbura.
About 400 people have been killed and 250,000 have fled to neighbouring states since Mr Nkurunziza announced in April that he would seek a third term.
He survived a coup attempt in May, and won elections in July.
Mr Ban’s visit was the latest in a series of diplomatic initiatives aimed at ending the unrest.
On Thursday, South Africa’s President Jacob Zuma and four other African leaders are due to visit Burundi, AFP news agency reports.
Mr Ban said Mr Nkurunziza’s promise to release the prisoners was “an encouraging step”.
Mr Nkurunziza had also given him an assurance that he would hold “inclusive dialogue” with the opposition, Mr Ban said.
“Burundi’s political leaders must be ready to summon the courage and the confidence that will make a credible political process possible,” the UN chief added.