Putin didn't identify Russia's former Cold War foe by name, but it was clear who he was targeting during his keynote speech at his annual investment forum in St Petersburg, where he was flanked by leaders from China, Japan and France, as well as the head of the International Monetary Fund (IMF).
"Globally, if a whole country, particularly a centre of power, acts that way, the situation may have negative, if not devastating consequences", he said. We won't lift the sanctions if nothing's done.
Macron, who had travelled to Washington in an unsuccessful bid to persuade Trump to keep faith with the Iran deal, did not explicitly criticise the US leader.
He said he had a strong relationship with Trump, but he acknowledged there are "issues on which we have differences".
Putin and Macron met in France previous year, just weeks after Macron's inauguration.
Speaking at a question-and-answer session in front of an audience of business executives and Russian officials, Putin said the US withdrawal was damaging and counter-productive.
Japanese Prime Minister Shinzo Abe also spoke at the forum and called for closer cooperation with Russian Federation.
The Iran deal was the first time Russia, France, Germany and others had agreed on a major worldwide issue since relations between Russia and the West chilled over Moscow's annexation of Crimea in 2014.
The presence of Macron and Abe and their statements in favour of cooperation with Moscow were important for Putin, indicating that the US -led efforts to isolate Russian Federation face increasing obstacles.
But observers said Putin remained the most powerful man in the country. However, some observers have suggested he might seek to have the constitution changed.
But "breaking the rules is becoming the rule", Putin said in an apparent jab at Trump, who has abandoned a Pacific free trade deal and forced a renegotiation of the United States pact with Canada and Mexico.