By Agence France-Presse
In addition to the dead, there were 28 injured -- 20 of them severely -- who were being treated at seven local hospitals, San Antonio Police Chief William McManus and Fire Chief Charles Hood told reporters.
The group included children and adults, the police chief said.
He said the truck driver had been arrested.
"We got a call from a Walmart employee about a welfare check in a tractor-trailer that was parked on the lot here," McManus told a news conference.
"He was approached by someone from that truck, who was asking for water. Came back with a water, called the police and we arrived on scene and found eight people dead in the back of that trailer," the police chief said, calling it a "horrific tragedy."
He said store security footage showed that some vehicles came to pick up some travellers who were on the truck and who had made it out alive.
"We're looking at a human trafficking crime this evening," he added.
It was not immediately clear how many people made it off the truck alive, McManus said.
Hood said the air conditioner in the trailer was not working.
"We started extricating patients out of the back of a semi-truck ... we had another 20 patients that were either in extremely critical condition or very serious condition and they have been transported to a number of hospitals."
San Antonio lies a few hours drive from the border with Mexico's Nuevo Leon state. Weather in the area has been hot and dry.
Federal immigration officials with Immigration and Customs Enforcement have also been notified, the police chief said.