The foreign ministry said the Mexican ambassador to Egypt visited five other nationals being treated at the Dar-el-Fouad Hospital in a western Cairo suburb, where they were listed in stable condition.
Egypt's interior ministry said security forces killed 12 people and wounded 10 others, including Mexicans and Egyptians, who were traveling in four pick-up trucks in the Western Desert. It did not indicate how many Mexicans were hit.
"Mexico condemns these incidents against our citizens and has demanded an exhaustive investigation about what happened from the government of Egypt," President Enrique Pena Nieto said on Twitter.
"For the moment, we regrettably confirm the death of two Mexican nationals in this incident," Mexico's foreign ministry said in a statement, adding that it was working on identifying them.
The foreign ministry gave few details about what happened, describing it only as a "grave incident" in which an "undetermined" number of Mexican tourists were attacked.