The suspect, 21-year-old Patrick Crusius, surrendered last Saturday with his hands up and told officers, "I'm the shooter," said an El Paso police detective, Adrian Garcia, according to an Associated Press report on the arrest warrant affidavit.
Crusius also waived his Miranda rights, including the right to remain silent, and is said to have spoken willingly with the police. He admitted he was explicitly targeting Mexicans, AP reported.
Crusius also told police that he drove from where he lived, in Allen, a northern suburb of Dallas, to El Paso, which is more than 10 hours away.
In El Paso, 22 people were killed and 24 others injured on Saturday when a gunman opened fire at a local Walmart. Eight of the victims were Mexican nationals and several others had Latino last names.
Crusius has been charged with capital murder and could face the death penalty. He is being held without bail, and federal prosecutors are considering charging him with a hate crime.
The Associated Press contributed to this article.