The policy, which was announced in April, would involve Britain sending tens of thousands of migrants who arrive on its shores more than 4,000 miles away (6,4000 km) to Rwanda.
Rwanda said on Monday it welcomed the ruling by judges in London.
"We welcome this decision and stand ready to offer asylum seekers and migrants safety and the opportunity to build a new life in Rwanda," Rwanda government spokesperson Yolande Makolo told AFP, describing it as a "positive step" to solving the global migration crisis.
Announcing the court's decision, Judge Clive Lewis said it was lawful for Britain to make arrangements with the Rwanda government to send asylum seekers to the country for their asylum claims to be determined there.
"The (British) government has made arrangements with the government of Rwanda which are intended to ensure that asylum claims of people relocated to Rwanda are properly determined there," the judge said.
"In those circumstances, the relocation of asylum seekers to Rwanda is consistent with the Refugee Convention and with the statutory and other legal obligations on the government, including the obligation imposed by the Human Rights
But he said Britain's interior minister, the Home Secretary, must consider properly the circumstances "of each individual claimant."
"The Home Secretary has not properly considered the circumstances of the eight individual claimants whose cases we have considered," he said.
Lewis said the Home Office’s decision in those cases "will be referred back to the Home Secretary for her to consider (them) afresh."
Britain's interior minister, Suella Braverman, and Prime Minister Rishi Sunak have joined Rwanda in welcoming the ruling.
"We have always maintained that this policy is lawful and today the court has upheld this," Braverman said, adding that it will help those deported "build new lives."
Sunak told reporters on a visit to Latvia the plan would help the government to "get to grips with illegal migration."
The country’s main opposition, however, said the government’s deportation plan would "do nothing" to stop the dangerous sea crossings.
Yvette Cooper, the Labour Party’s home affairs spokeswoman, called the plan "unworkable" and "unethical" and a "damaging distraction from the urgent action the government should be taking to go after the criminal [people trafficking] gangs and sort out the asylum system."
Some information for this report came from Agence France-Presse.