The Iraqi forces pushed the armed militants back after a two-hour clash, the ministry added.
The border clash came after Iraq said earlier this week that it had discovered three underground tunnels on its border with Syria, which were used by militants to smuggle weapons into Syria.
The foreign-backed militancy in Syria has had spillover effects in neighboring countries including Lebanon and Iraq.
In addition to infiltration attempts by militant groups, Iraq is also witnessing bombings and shooting attacks on an almost regular basis. The Baghdad government blames al-Qaeda for the carnage.