WHO representative Rui Gama Vaz, speaking in the capital Abuja, said it was a “spectacular success story”.
Nigeria won praise for its swift response after a Liberian diplomat brought the disease there in July.
An estimated 70% of those infected have died in those countries.
The WHO officially declared Senegal Ebola-free on Friday.
Meanwhile, European Union foreign ministers are meeting in Luxembourg to discuss how to strengthen their response to the threat posed by Ebola.
European countries have committed more than 500m euros (£400m; $600m) but the UK is pressing to double that amount.
The money is being sought to help reinforce over-stretched healthcare systems in Liberia, Sierra Leone and Guinea and to mitigate the damage Ebola is doing to their economies.
Ahead of the talks, German Foreign Minister Frank-Walter Steinmeier suggested the EU could send a civilian mission to West Africa that would serve as a platform for sending medical staff.
Another diplomat said there were plans for three countries to spearhead aid to the region – the UK for Sierra Leone, France for Guinea and the US for Liberia.
Earlier, the Spanish government said a nurse who became the first person to contract Ebola outside West Africa had tested negative for the virus.
The result suggests Teresa Romero, 44, is no longer infected although a second test is required before she can be declared free of Ebola.
Ms Romero contracted the virus when treating two infected patients in a Madrid hospital.
In another development, US health officials said most of the people quarantined after coming into contact with Ebola victim Thomas Eric Duncan had been given the all-clear. The 21-day monitoring period applied to about 50 people.
Two nurses at the Texas Health Presbyterian Hospital in Dallas became infected with Ebola after treating Mr Duncan, who was from Liberia. He died on 8 October.
On Sunday, the Pentagon announced it would prepare a 30-person rapid reaction medical support team that could provide help to civilian doctors in the US confronted with possible Ebola cases.
It said the team would not be sent to West Africa.
The WHO can declare an Ebola outbreak over if two incubation periods of 21 days pass with no new cases. The last reported case in Nigeria – Africa’s most populous country – was discovered on 5 September.
“The virus is gone for now. The outbreak in Nigeria has been defeated,” WHO Nigerian representative Rui Gama Vaz said on Monday.
“This is a spectacular success story that shows to the world that Ebola can be contained but we must be clear that we have only won a battle, the war will only end when West Africa is also declared free of Ebola.”
The BBC’s Will Ross in Lagos says the nightmare scenario of Ebola spreading through Nigeria’s 170 million people has been avoided and the nation is heaving a collective sigh of relief.
The outbreak there began when Patrick Sawyer, an American-Liberian citizen, was diagnosed with the illness in July.
– BBC News