The tourists were travelling in four vehicles that entered a restricted zone in the Wahat area of the Western Desert, a ministry statement said.
Ten Mexicans and Egyptians were also injured and are being treated in a local hospital.
The ministry said it had formed a team to investigate the incident.
Mexico’s President Enrique Pena Nieto condemned the incident and said he had “demanded an exhaustive investigation by the Egyptian government”.
The Mexican foreign ministry confirmed that at least two of its national had been killed and said it was working to confirm the identities of the other victims.
In a statement, it said Mexico’s ambassador in Egypt, Jorge Alvarez Fuentes, had visited the local hospital and spoken to five Mexicans who were in a stable condition.
‘Mistakenly dealt with’
The statement (in Arabic) from Egypt’s interior ministry said the four vehicles the tourists were travelling in were “mistakenly dealt with” during a joint military police and armed forces operation.
It said the incident happened on Sunday in an area that “was off limits to foreign tourists” but it did not give an exact location.
The vast Western Desert area is popular with foreign sightseers, but is also attractive to militants, reports the BBC’s Orla Guerin in Cairo.
The region is a gateway to the long border with Libya and the weapons available on the other side, our correspondent adds.
On Sunday, the Islamic State (IS) group in Egypt claimed it had “resisted a military operation” in the desert.
A group claiming to be affiliated with IS also said on Sunday that it was present in Farafra, a town in the area.
The insurgency in Egypt gathered momentum after the army overthrew Islamist President Mohammed Morsi of the Muslim Brotherhood in mid-2013 following protests against his rule.
The government says hundreds of police and soldiers have been killed, many of them in attacks claimed by IS’s Sinai Province affiliate.
Up until recently most of the fighting has taken place in the Sinai Peninsula with occasional attacks taking place in Cairo and other cities.
In July, Egypt vowed to rid the Sinai Peninsula of militants after major clashes with IS fighters there killed more than 100 people.
It said that operations will not stop until the area is cleared of militants.