Two children in the northeast state of Borno had been paralysed by the disease, the Geneva-based group said in a statement.
The new cases represent a major setback for Nigeria, which had just celebrated two years without polio last month and was on track to be certified free of the virus in July 2017.
"The overriding priority now is to rapidly immunise all children around the affected area," Matshidiso Moeti, WHO Regional Director for Africa, said.
That has been difficult to do in Borno, a region ravaged by Boko Haram insurgents in their quest to create a fundamentalist Islamist state.
The state is also facing a food crisis with UNICEF warning in July that some 50,000 Nigerian children risk starving to death.
"The confirmation of a wild poliovirus outbreak in northeast Nigeria underlines the emergency facing children in conflict-affected Borno state, where children are already facing dangerously high levels of malnutrition," Doune Porter, UNICEF Nigeria communications officer, said in a statement sent to AFP.
Nigeria had struggled to contain the virus after some northern states imposed a ban on vaccinations in 2003 with parents fearing that the vaccine wasn't safe.
But the government has been working to eradicate the disease, with Nigerian President Muhammadu Buhari pledging to work with international partners "to ensure that this disease is wiped off the face of the earth for good".
Polio is a highly infectious viral disease that mainly affects young children and can result in permanent paralysis, according to WHO. There is no cure and it can be only prevented through immunisation.