Another five soldiers were wounded in a rocket attack on Turkish tanks, the military said in a statement.
The fatalities are believed to be the first since Turkey launched its operation inside Syria two weeks ago.
Two fighters from the Free Syrian Army were also killed and another two injured in the attack.
"Two of our hero comrades were martyred and five were wounded in a rocket attack on two of our tanks by Daesh (IS) elements," the army statement said.
The rocket attack was launched near the village of al-Waqf, it added.
Syrian rebels backed by Turkey say they have recaptured a number of villages from IS since the Turkish operation - code-named Euphrates Shield - began.
The rebels have also retaken the key border town of Jarabulus.
On Sunday, Turkey said IS fighters were pushed out of their last positions along the Turkish-Syrian border.
Turkish forces have targeted IS inside Syria, but have also attacked Kurdish fighters in the same region.
The pursuit of the Kurdish YPG militia has led to criticism by Washington, which regards the Kurds as one of the most effective forces in the battle against IS.
Two Turkish soldiers have been killed by the Islamic State (IS) group in clashes in northern Syria, the Turkish army has said.