They were driving from Mexico City to the northern town of Monterrey when they were stopped at what appeared to be a military checkpoint in the northern state of San Luis Potosi. According to an unnamed Mexican official, someone opened fire on them after they stopped.
The surviving agent was airlifted to Mexico City. His condition is unknown.
According to officials, the agent who was killed was identified as Special Agent Jaime J. Zapata, who joined ICE in 2006.
The agents were working out of an ICE office in Mexico City that deals with drugs and illegal immigration.
"This is a difficult time for ICE and especially for the families and loved ones of our agents. Our hearts and prayers go out to them. This tragedy is a stark reminder of the risks confronted and the sacrifices made by our men and women every day," ICE Director John Morton said in a statement. "We are working closely with our partners here in the United States and in Mexico to ensure those responsible for this senseless act are brought to justice."
Because the incident involves an American, the FBI will be assisting in the investigation.
Though Mexico is seeing record rates of violence from warring drug cartels and a crackdown on organized crime, it is rare for U.S. officials to be attacked.
But the U.S. government has increasingly become concerned about the safety of its employees in Mexico amid the escalating violence.
In March, a U.S. employee of the consulate, her husband and a Mexican tied to the American consulate were killed when drug gang members fired on their cars as they left a children's party in Ciudad Juarez, the city across from El Paso, Texas.
The U.S. State Department has taken several measures over the past year to protect consulate employees and their families. It has at times authorized the departure of relatives of U.S. government employees in northern Mexican cities.
In July, it temporarily closed the consulate in Ciudad Juarez after receiving unspecified threats.
The Associated Press contributed to this story.