"We have also agreed to have our respective teams start negotiations immediately, and we will begin by calling President (Volodymyr) Zelenskiy, of Ukraine, to inform him of the conversation, something which I will be doing right now," Trump said in a post on his social media platform.
The Kremlin said Putin and Trump had spoken for nearly an hour and a half by telephone and that the two men had agreed to meet.
"The Russian president invited the US president to visit Moscow and expressed his readiness to receive American officials in Russia in those areas of mutual interest, including, of course, the topic of the Ukrainian settlement," Kremlin spokesman Dmitry Peskov said.
"Putin and Trump also agreed to continue personal contacts, including arranging a face-to-face meeting."
Trump has long said he would quickly end the war in Ukraine, without saying how he would accomplish this.
Earlier on Wednesday, Trump's Defense Secretary, Pete Hegseth, said a return to Ukraine's pre-2014 borders was unrealistic and the US administration did not view NATO membership for Ukraine as part of a solution to the war.
Speaking at a meeting of Ukraine's allies at the headquarters of the NATO military alliance in Brussels on Wednesday, Hegseth delivered the clearest and bluntest public statement so far on the new US administration's approach to the nearly three-year-old war.
"We want, like you, a sovereign and prosperous Ukraine. But we must start by recognising that returning to Ukraine's pre-2014 borders is an unrealistic objective," Hegseth told a meeting of Ukraine and more than 40 allies at NATO headquarters in Brussels.
"Chasing this illusionary goal will only prolong the war and cause more suffering."
with DPA