In a strongly-worded letter to Andrei Kelin on Friday, Edinburgh Council leader Adam McVey told him the consulate is "no longer welcome in Edinburgh until Russia stops this illegal war and Russian troops leave Ukrainian soil".
The warning comes after the council voted to condemn the war and made the president of Ukraine and mayor of Kyiv freemen of the city last month.
In his letter, Mr McVey said Edinburgh is "not an enemy of the Russian people" and "we recognise the courageous actions across the Russian population who have expressed opposition to this war at great cost to themselves at the hands of their own government in Moscow".
He added: "We are witnessing the actions of the government you represent and the murder of brave Ukrainian civilians and soldiers - which will be investigated as war crimes in due course.
"Our wholehearted sympathy and thoughts are with the Ukrainian people is resisting the Russian government's illegal and senseless war.
"Until Russia withdraws from Ukraine, I reiterate that we will not be accepting any civic invitations or collaborations of any kind and I ask that you withdraw the consul from our city immediately.
"They are not welcome in Edinburgh."