Governor Greg Abbott described it as “one of the most deadly days in the history of Texas”.
The massacre happened at a Walmart store near the Cielo Vista Mall, a few miles from the US-Mexican border.
A 21-year-old man is in custody. Police said the suspect was a resident of the Dallas-area city of Allen, about 650 miles (1,046km) east of El Paso.
He has been named by US media as Patrick Crusius.
CCTV images said to be of the gunman and broadcast on US media show a man in a dark T-shirt wearing ear protectors and brandishing an assault-style rifle.
US President Donald Trump described the attack as “an act of cowardice”.
“I know that I stand with everyone in this country to condemn today’s hateful act. There are no reasons or excuses that will ever justify killing innocent people”, he wrote on Twitter.
The victims of the attack have not yet been named. However, Mexico’s President Manuel Lopez Obrador said three Mexicans were among those killed, Reuters news agency reports.
The attack came less than a week after a teenage gunman killed three people at a California food festival. The Texas shooting has been dubbed the eighth deadliest in modern US history.