Orkney Islands Council had said it was powerless to prevent the NS Champion accessing Flotta later this week, despite growing local anger.
However, Transport Secretary Grant Shapps said on Monday afternoon that UK ports should refuse access to Russian boats.
The council then said the arrival had been cancelled.
Mr Shapps said: "Today I've written to all UK ports asking them not to provide access to any Russian flagged, registered, owned, controlled, chartered or operated vessels.
"Given Putin's action in Ukraine I've made clear these vessels are not welcome here with prohibiting legislation to follow."
Council leader James Stockan said: "Over the weekend, officers worked tirelessly to try and find a solution to the issue of the visiting tanker - in order to support the strength of feeling that is running not only in our community, but throughout our organisation too.
"We welcomed the announcement this afternoon from the UK government's Secretary of State for Transport - this was very much one of the avenues we have been exploring over the last few days. That announcement was followed by news from the ship's agent that they were cancelling the visit."
He added: "This was a very complex, fast-moving situation - and we have ultimately achieved the best possible outcome. Our thanks go out to all that have contributed to this outcome but most of all sincere thanks to our incredible community as their role in this cannot be underestimated."
First Minister Nicola Sturgeon welcomed the step while legislation for longer term took effect.
The tanker is owned by Sovcomflot (SCF Group), a large shipping company majority-owned by the Russian state.
It had been due at Flotta on Tuesday, and that had then been delayed until Wednesday, before the cancellation.
Sovcomflot is also currently subject to US sanctions limiting its ability to raise money through the US markets.
At a protest against the Russian invasion of Ukraine in Orkney on Saturday, demonstrators spoke of their anger over the Russian tanker plans.