Ambassador Andrei Karlov, 62, was several minutes into a speech at the embassy-sponsored exhibition in Ankara when a man fired at least eight shots, according to the AP photographer in the audience.
"Don't forget Aleppo, don't forget Syria!" the gunman shouted in Turkish, referring to the Syrian city where Russian bombardments have helped drive rebels from areas they had occupied for years during the war.
He also shouted "Allahu akbar," the Arabic phrase for "God is great" and continued in Arabic: "We are the descendants of those who supported the Prophet Muhammad, for jihad."
The gunman approached Karlov as he lay on the ground and shot him at least one more time at close range, according to the AP photographer. The attacker also smashed several of the framed photos hung for the exhibition. There was panic as people ran for cover. Three other people were wounded in the attack, Turkey's NTV television said.
After shooting the ambassador, the gunman climbed to the second floor of the same building and a 15-minute shootout with police ensued before he was killed, Turkey's Anadolu news agency reported.
The attack comes a day before a meeting of Russian, Turkish and Iranian foreign and defense ministers in Moscow to discuss Syria. Russia and Iran have backed Syrian President Bashar Assad throughout the nearly six-year conflict, while Turkey has supported Assad's foes.
"It's a tragic day in the history of our country and Russian diplomacy," Russian Foreign Ministry spokeswoman Maria Zakharova said in televised comments.
"Ambassador Karlov has made a lot of personal contributions to the development of ties with Turkey. He has done a lot to overcome a crisis in bilateral relations," she said. "He was a man who put his heart and his soul into his job. It's a terrible loss for us and also the world."
Karlov joined the diplomatic service in 1976. He served as Russia's ambassador to Pyongyang in 2001-2006, and later worked as the chief of the Foreign Ministry's consular department. He had served as the ambassador to Turkey since 2013.
U.S. State Department spokesman John Kirby said U.S. officials were aware of reports about the shooting.
"We condemn this act of violence, whatever its source," Kirby said.
The United Nations also condemned the attack.
"There can be no justification for an attack on an ambassador ... and we very much hope that the perpetrators will be brought to justice," U.N. spokesman Stephane Dujarric said.
Melih Gokcek, the mayor for Ankara, told reporters outside the exhibition center that the "heinous" attack aimed to disrupt newly-re-established relations between Turkey and Russia.
Relations between Russia and Turkey were badly strained by the downing of a Russian warplanes at the Syrian border in November 2015, but Turkey's apology earlier this year helped overcome the rift. The leaders of the two countries, Presidents Vladimir Putin and Recep Tayyip Erdogan, have held several meetings in recent months and spoken frequently over the phone.
Russia and Turkey have co-sponsored the evacuation of civilians and rebels from Aleppo and also discussed the prospect of organizing a new round of peace talks in Kazakhstan's capital, Astana.
Turkey has struggled with multiple security threats in recent years, including Kurdish militants who claimed responsibility for a Dec. 10 bombing in Istanbul that killed 44 people, many of them police. The Islamic State group fighting in Syria and Iraq has also been blamed for attacks in Turkey, a NATO member and a partner in the U.S.-led campaign against the group.
Additionally, Turkish security forces and courts remain preoccupied with purging state institutions of the supporters of an exiled Islamist cleric whom the government accuses of staging a failed coup attempt in July.