The soldiers were supporting Syrian rebels in efforts to capture the city of al-Bab from so-called Islamic State, BBC News reports.
It is part of a broader offensive by Turkey to push IS and Kurdish fighters away from Turkey's southern border.
Russia and Turkey, who back opposing sides in the war, have been jointly targeting IS in airstrikes recently.
Read alsoAmnesty: Thousands killed in mass hangings at Syrian military jailA Russian aircraft attacked a building where some of the soldiers had been deployed near al-Bab, the Turkish military said.
It had been planning to hit IS targets but "by accident three of our soldiers were martyred when a building was bombed where our units were", it added.
Eleven other soldiers were wounded in the so-called friendly fire incident on Thursday.