The High Court said on Wednesday some of what the adviser had told ministers must be disclosed in a major court case over the Rwandan refugee policy.
Lawyers for the government had argued disclosing the comments would damage relations with the African country.
The adviser had warned ministers Rwanda's government tortured and killed political opponents, the court heard.
While that warning of political violence was disclosed in court on Tuesday, further comments from the expert remain secret.
The Foreign, Commonwealth and Development Office (FCDO) adviser had looked at revisions to the government's own report into Rwanda's human rights record.
That document was being updated as ministers planned to send asylum seekers on a flight to Rwanda under the controversial relocation scheme announced in April.
The one-way plan, worth at least £120m to Rwanda, aims to discourage illegal crossings of the English Channel - but it is on ice until the High Court rules whether it is legal.
In court, the government said 10 further comments from the unnamed official should be kept confidential rather than be used as evidence in that forthcoming court case.
This meant they would not be disclosed to the group of migrants and charities who were challenging the flights policy.
But in his ruling Lord Justice Lewis said six of the official's comments, or parts of them, should feature in next month's legal battle.
He ruled four should remain entirely secret because of the damage they would do to international relations.
"I accept that disclosure of the 10 extracts would give rise to a real risk of causing serious harm to the United Kingdom's international relations, particularly with Rwanda," he said.
"I recognise that the government... regards a policy whereby those seeking asylum have their claims determined in Rwanda as a significant means of deterring people from seeking to cross the English Channel in boats or by other means.
"Disclosing the material in issue in this case would undermine the development and implementation of that policy."
However the judge said given September's major legal action had to decide whether sending asylum seekers to Rwanda was lawful, the claimants and the court needed to consider as much evidence as possible.
He said some of the official's comments would have "evidential significance" - and the public interest in disclosing them outweighed the government's case for keeping them secret.
Lord Justice Lewis said: "I recognise that there is a strong public interest in not undermining international relations with a friendly state. Nonetheless, that consideration is outweighed by the public interest in ensuring access to relevant information in this litigation and by the extent to which the information is already in the public domain."
The official's precise words are not yet in public. The government has been allowed time to consider an appeal. If the judgment stands, the comments are likely to emerge in public in September.
Migrants identified for the first aborted flight, and three media organisations - BBC News, including BBC Two's Newsnight, the Times and the Guardian newspapers - sought the disclosure of the material.