Ambassador Andrei Karlov was making a speech at the opening of a photographic exhibition when the gunman interrupted him, firing multiple shots according to video from the scene.
The assassin, who was shot dead himself, was later named as 22-year-old undercover police officer, Mevlut Mert Altintas.
He shouted “Allahu Akbar” before firing at least eight shots, according to an Associated Press photographer in the audience. Reports suggest he also shouted: “Don’t forget Aleppo! Don’t forget Syria!”
President Vladimir Putin vowed to “step up the fight against terrorism”, and said the killing was a despicable provocation aimed at spoiling Russia-Turkey ties and derailing Moscow’s attempts to find, with Iran and Turkey, a solution for the Syria crisis.
The attack appears to mark one of the most serious spillovers of the Syria conflict in Turkey.
Relations between Moscow and Ankara have long been fraught over the conflict, the two supporting opposing sides.
Russian RIA news agency said Karlov had died of his wounds.
The Russian foreign ministry confirmed the attack mounted as Ambassador Andrei Karlov made a speech at the opening of a photographic exhibition.
Hurriyet newspaper said Turkish special forces had surrounded the building. NTV said three other people were wounded, Reuters reported
A Reuters witness said that while gunfire rang out for some time after the attack, it had now stopped. A Hurriyet newspaper reporter said the attacker chanted Islamist slogans.
Tensions have escalated in recent weeks as Russian-backed Syrian forces have fought for control of the eastern part of the city of Aleppo, triggering a stream of refugees.
It was not immediately clear who carried out the attack. Islamic State militants have been active in Turkey and carried out several bomb attacks on Turkish targets.
Live photos from the press conference show the gunman pointing his weapon at the assembled crowd, who were photographed cowering in fear.
British Prime Minister Theresa May appeared to learn of the attack during a session in the House of Commons at Westminster.
Sat beside Foreign Secretary Boris Johnson, May said: “I was just looking what I believe is breaking news that the Russian Ambassador to Turkey has been shot which is to be confirmed but which is a matter of concern.”
Johnson later described the attack as a “cowardly” and “despicable” murder.
In televised comments, Putin, speaking at a special meeting in the Kremlin, heaped praise on Karlov, and made clear that Moscow’s response to his assassination would be robust.
“A crime has been committed and it was without doubt a provocation aimed at spoiling the normalization of Russo-Turkish relations and spoiling the Syrian peace process which is being actively pushed by Russia, Turkey, Iran and others,” said Putin.
“There can only be one response - stepping up the fight against terrorism. The bandits will feel this happening.”
Putin, who said he personally knew the slain envoy, said he had agreed in a phone call with his Turkish counterpart Tayyip Erdogan that Russian investigators would soon fly to Ankara to help the Turks with the investigation.
“We must know who directed the killer’s hand,” Putin said.