The body of Andrei Karlov, shot by off-duty Turkish policeman Mevlut Mert Altintas, was flown home on Tuesday.
President Vladimir Putin took part in the ceremony at the foreign ministry before a state funeral.
After the shooting, the killer shouted the murder was in revenge for Russian involvement in Aleppo.
There had been fears the shooting could derail relations between the two countries, however both have stressed their alliance, BBC Moscow correspondent Sarah Rainsford reports.
Teams from Russia and Turkey are working together on the murder investigation.
The sombre ceremony began with mourners including Mr Putin, Prime Minister Dmitry Medvedev and Foreign Minister Sergei Lavrov laying flowers beside the late ambassador's open casket in the foreign ministry.
Andrei Karlov's coffin was returned to Russia after a ceremony at Esenboga airport, attended by senior officials and an honour guard of six Turkish soldiers.
In highly unusual scenes for a Muslim country, a Russian Orthodox priest said prayers and swung incense over the coffin, while a Turkish soldier stood holding a picture of the murdered diplomat.
Andrei Karlov's widow Marina wept at the ceremony in Turkey. She was present when Altintas, 22, opened fire on her husband, who took up his posting in Ankara in 2013.
It was not clear if Altintas, an Ankara riot police member who was later shot dead in a gun fight with Turkish officers, had links to any militant group.
Karlov, 62, was a veteran diplomat who had served as Soviet ambassador to North Korea for much of the 1980s.
During his time in Ankara he had to grapple with a major crisis when a Turkish plane shot down a Russian jet close to the Syrian border.
Demanding a Turkish apology, Moscow imposed damaging sanctions - notably a freeze on charter flights by Russian tourists - and the two countries only recently mended ties.
A farewell ceremony is taking place in Moscow for the Russian ambassador assassinated as he gave a speech in the Turkish capital, Ankara.