He will accompany Ban on a tour of Asia next month.
"Ensuring that every child in the world has the opportunity to go to school and to learn is a long-standing passion of mine," he said.
Brown said he hoped to emulate the successes of Kofi Annan, the former UN Secretary General and former US President Bill Clinton, as special UN envoys for Syria and Haiti respectively.
As special envoy, Brown will devote himself to working closely with all key partners to help galvanise support for the secretary-general's global initiative on education (education first), which aims to achieve quality, relevant, and inclusive education for every child.
Focus will be on countries with the highest number of children out of school, of which nearly half are in countries affected by conflict.
A UN spokesman added, "The appointment builds upon Brown's impressive commitment to education as a fundamental right of every child. The secretary-general is confident Brown will be a genuine champion for the world's most poor and that his passion and conviction will re-energise international action for everyone's right to opportunity through education."
He succeeded Tony Blair as Labour prime minister in 2007 and stood down in 2010 after the party lost a parliamentary majority in general elections, to be replaced by current Conservative premier David Cameron.
The monumental British blunder on Tibet
Dow link tarnishes Games' reputation: London Assembly
'Govt's mishandling of GAAR scared investors'
Military tactics may push Syria to civil war: India
'UK needs migrants, migrants need UK'