San Diego is the United States’ eighth-largest city.
Kevin McCall, Wal-Mart’s spokesperson, said that the Arkansas-based company, may consider a legal challenge or voter referendum if the measure becomes law.
Jerry Sanders, San Diego’s mayor, will veto the ban if the council reaffirms it on a second vote.
Fred Sainz, the mayor’s spokesperson, said the vote was expected in January.
“What the council did tonight was social engineering, not good public policy,” Sainz said.
The council can override his veto with five votes.
Supporters of the ban argued that Wal-Mart puts smaller competitors out of business, pays workers poorly, and contributes to traffic congestion and pollution.
Those against the ban said large shops provide jobs and low prices and that a ban would limit consumer choice.
Kevin Faulconer, a San Diego councillor who opposed the ban, said: “Quite simply, I do not think it is the role of the San Diego City Council to dictate where families should buy their groceries.”
Wal-Mart has about 2,000 Supercenter shops, including 21 in California, but none in the San Diego area.
Wal-Mart has not disclosed plans for an outlet in the San Diego area, but many analysts believe that the retailer probably wants to expand.