The announcement came from Russia's Foreign Ministry Spokeswoman Maria Zakharova.
Karlov was delivering a speech at the opening ceremony of an art gallery when an armed assailant opened fire on him and then in the air, according to Anadolu Agency correspondent who witnessed the incident.
The envoy had been seriously wounded at the scene and had been taken to Guven Hospital in Cankaya immediately after being shot.
Zakharova said Russia regarded the gun assault as a "terror attack". Russia will carry the issue to the UN Security Council, the spokeswoman added.
Zakharova said the incident must be investigated in detail and perpetrators should be punished accordingly.
The assailant was 'neutralized' during an operation that lasted around 15 minutes by police special forces at the scene, the Contemporary Arts Gallery in Ankara's central Cankaya district.
Kremlin Spokesman Dmitry Peskov told reporters that President Vladimir Putin was informed about the incident.
"We informed President Putin. We are checking information," Peskov added.
Russia's Foreign Ministry Spokeswoman Maria Zakharova also said they are in touch with Turkish authorities.
Turkey's Interior Minister Suleyman Soylu and Defense Minister Fikri Isik are being informed by officials at the scene.
Turkish Prime Minister Binali Yildirim was informed by Soylu about the attack.
In Washington, the U.S. State Department condemned the attack "whatever its source".
"Our thoughts and prayers are with the victims and their families," spokesman John Kirby said in a statement.
British Foreign Minister Boris Johnson also reacted on his official Twitter account: "Shocked to hear of despicable murder of #Russia's Ambassador to #Turkey. My thoughts are with his family. I condemn this cowardly attack."
Andrey Gennadyevich Karlov was born in 1954 in Moscow.
He graduated from Moscow State Institute of International Relations in 1976. In 1992 he graduated from Diplomatic Academy.
He worked on different positions in the Ministry of Foreign Affairs of the USSR and Russia, as well as foreign missions.
He has been serving as the Ambassador of the Russia to Turkey since July 2013.