Relations between China and Russia have deepened in recent years, particularly after the Russian invasion of Ukraine in early 2022.
Putin addressed Xi as "dear friend" on Tuesday and said Moscow's ties with Beijing were "at an unprecedentedly high level".
Following their formal talks, they planned to have another meeting over tea with some of their top aides.
The talks come the day after both attended a summit of the Shanghai Co-operation Organisation in the nearby Chinese city of Tianjin, and the day before a grand Chinese military parade in Beijing to mark the 80th anniversary of the end of World War II.
The Soviet Union was neutral for much of the war in Asia, but provided assistance to China in earlier fighting against invading Japanese forces in the 1930s.
It also declared war on Japan in the last days of World War II and sent troops over the border into Japanese-occupied northeastern China.
"We were always together then, we remain together now," Putin said.
China says it is neutral in the Ukraine war but has provided an economic lifeline to Russia by continuing trade despite western sanctions.
Some of its companies have been accused of abetting the military industry.
The summit of the 10-member Shanghai Co-operation Organisation brought Xi and Putin together with Indian Prime Minister Narendra Modi, who held separate talks with both leaders on the sidelines of the meeting.
US President Donald Trump's steep tariffs on India and the tone coming from the White House have pushed New Delhi closer to China and Russia, though Modi will not attend China's military parade.
Putin and Xi held a three-way meeting with Mongolian President Khurelsukh Ukhnaa before their talks.
His landlocked country of grasslands and mineral mines is sandwiched between the two giants.
Putin said in opening remarks that the three countries are good neighbours, with a shared interest in developing ties.
"Our three countries have much in common," he said.
In 2024, Putin made an official visit to Mongolia, where the government ignored calls to arrest him on an International Criminal Court warrant for alleged war crimes stemming from the invasion of Ukraine.