ISTANBUL—A young Turkish policeman, railing about Russia’s role in Syria’s bloody war, shot and killed Moscow’s ambassador to Ankara during an art opening Monday night, an attack that all three countries termed an act of terror.

A video of the attack showed the assailant, in black suit and white shirt, standing over the fallen diplomat with gun in hand, shouting, “Don’t forget Aleppo, don’t forget Syria.”

He...