Investigators believe the illegal drug was either laced with some kind of poison or "cut" with another substance.
The regional security minister called on any users who had bought cocaine in the past 24 hours to throw it away.
Reports suggest the drugs were bought in the same shantytown, and nine arrests have been made.
Investigators are awaiting the results of post-mortem examinations to compare drugs seized in raids with those consumed by the victims.
Those affected come from the Hurlingham, Tres de Febrero and San Martín districts of the capital region and were brought to local hospitals.
Outside a hospital in Hurlingham, people said by local media to be related to one of the victims attacked and damaged an empty police car.
Cocaine (hydrochloride) is a highly addictive stimulant extracted from the leaves of coca plants and is generally snorted.
A 2019 report on drug consumption in the Americas listed Argentina as the country with the third highest rate of cocaine consumption per person after the US and Uruguay.
In San Martín, police identified four of the victims as Hernán Castro, 45, Martín López, 36, Dino Melgarejo, 33, and Fernando Yacante, whose age was not given, the Buenos Aires Times reports.
One user reportedly told police they had bought cocaine off an individual in the Puerta 8 shantytown in Tres de Febrero, and raids were launched.
Cocaine was subsequently found in similar packages to those provided by a relative of one of one of those who had died.
Sergio Berni, the security minister for Buenos Aires province, said: "Every dealer that buys cocaine cuts it. Some do it with non-toxic substances such as starch. Others put hallucinogens, and if there is no form of control, those things pass."
On this occasion, however, the drug was cut with a harmful substance as part of a "war between drug-traffickers", he was quoted as saying by AFP news agency.
Authorities suspect the substance used to cut the cocaine contained a strong sedative, the agency adds.
Victims are believed to have suffered convulsions and sudden heart attacks.