Boris Johnson inadvertently thanked Russia's Vladimir Putin for his "inspirational leadership" instead of Ukrainian President Volodymyr Zelensky.
The former prime minister's slip-up came during his first major contribution as a backbench MP in a Commons debate.
Mr Johnson paid tribute to the "heroism of the Ukrainian armed forces" and hailed the importance of the "weapons that we are proud to be offering."
He went on: "Thanks also, of course, to the inspirational leadership of Vladimir Putin."
Mr Johnson immediately corrected his mistake, adding: "The inspirational leadership of Volodymyr Zelensky, forgive me."
Meanwhile James Cleverly, the foreign secretary, called on countries to reject the "charade" of referendums that Putin looks set to use to annex swathes of Ukrainian territory.
At a meeting of the United Nations Security Council in New York, Mr Cleverly said: "We have information which means that we know that Russia is about to hold sham referenda on sovereign Ukrainian territory, with no basis in law, under the threat of violence.
"We know what Vladimir Putin is doing. He is planning to fabricate the outcome of those referenda. He is planning to use that to annex sovereign Ukrainian territory, and he is planning to use it as a further pretext to escalate his aggression."
He added: "We call on all countries to reject this charade and to refuse to recognise any results."
The Security Council meeting came a day after Putin raised the possibility of using nuclear weapons, warning that Russia would use "all the means at our disposal" to protect itself.
The foreign secretary spoke after Sergei Lavrov, the Russian foreign minister, who made his own remarks and then left the chamber.
Mr Lavrov said: "What’s particularly cynical is the position of states pumping Ukraine full of weapons, training their soldiers.
"[They] drag out the fighting as long as possible in spite of the victims in order to wear down and weaken Russia."
Mr Cleverly said: "Today I have listened to further installments of Russia's catalogues of distortions, dishonesty and disinformation.
"He's left the chamber, I'm not surprised. I don't think Mr Lavrov wants to hear the collective condemnation of this council."
Antony Blinken, the US secretary of state, earlier told the meeting that "one man [Putin] chose this war, one man can end it".
'One man chose this war, one man can end it'
He said: "Every council member should send a clear message that these reckless nuclear threats must stop immediately.
"If Russia stops fighting, the war ends, but if Ukraine stops fighting, Ukraine ends."
It came as reports emerged that Russia's military is divided over how to proceed in the wake of recent Ukrainian gains on the battlefield.
US intelligence intercepted communications showing Russian officers disagreeing with each other, and complaining to their families at home, CNN reported.
Putin was also reported to be giving orders directly to his generals in the field, suggesting dysfunction in the command structure.