Israel will deport 16,000 refugees to West, while grant 16,000 temporary residency status.
Implementing the signed agreement was expected to take five years.
In January, Israel started the implementation of a plan to deport migrants who had entered the occupied territories, threatening to detain those who refused to leave.
The refugee agency had urged Israel to reconsider its original plan, saying migrants who have relocated to sub-Saharan Africa in the past few years were unsafe and ended up on the perilous migrant trail to Europe, some suffering abuse, torture and even dying on the way.
Netanyahu's office said that legal obstacles and ensuing problems with the proposed third-country African destinations forced the government to amend its plans and come to an agreement under United Nations auspices.
"We're doing the best thing possible through an unprecedented agreement" with the United Nations High Commissioner for Refugees, Netanyahu said.
A fence Israel has built over the past few years along its border with Egypt has all but stopped African migrants from entering the country illegally.
The deal announced by Netanyahu's office appeared to end the possibility that many would be forcibly deported.
Disney star actress joins President Trump's White House!
The former actress is not the first television personality in President Trump's administration. She applied to the internship through the White House's website.
The PMO said that the new plan had been approved by the attorney general and was in keeping with global law and practice.
Mr Netanyahu said the opposition was "baseless and absurd" and that Israel would resettle "genuine refugees".
"[This is] a unique agreement between the UN commissioner and the state of Israel, that takes 16,250 people out, takes them out to developed countries like Canada, or Germany and Italy - that is the commitment the UN High Commissioner has made - to organize it and even to fund it", Netanyahu said on live television.
Opposition leaders and activists in Israel hailed the new deal on Monday.
But Naftali Bennett, head of the Jewish Home party that is part of Mr Netanyahu's governing coalition, condemned the plan.
He called it a "total surrender to the false campaign in the media" and said the credibility of the government was at stake. This group includes people fleeing war-torn countries such as Syria, who are likely to be granted refugee status, as well as people who are seeking jobs and better lives, who governments are likely to rule are economic migrants.
Netanyahu said on social media that Rwanda had in the past few weeks folded to enormous pressure and backed out of the deal it had made with Israel to accept expelled migrants, prompting him to seek the new arrangement with the UNHCR.
Shlomo Maslawi, a Tel Aviv councillor who has organised protests against the presence of many African migrants in the south of the city, said the deal was a "disaster that will reverberate for generations to come".