The attack is the latest in a series of mass shootings that have shaken the South African city.
Police said they believe more than 10 suspects were driven in a minibus to an informal settlement in the Cleveland suburb of Johannesburg late on Tuesday night. Once there, they opened fire on people.
South Africa has seen several high-profile mass shootings recently, including two in December that killed more than 20 people. One of those attacks also involved multiple shooters.
The shootings are sometimes linked to illegal mining gangs that operate in and around Johannesburg. The suburb of Cleveland is connected to illegal mining activity.
According to a police statement, the attackers moved through the area, opening fire on residents and community members at multiple locations before fleeing the scene in the same vehicle.
The victims were nine men and three women, according to police. Eleven died at the scene and another victim died in the hospital.
Police were searching for the attackers but no arrests had been made. The motive for the shooting remained unclear.
Informal settlements in South Africa are unplanned residential areas usually made up of shacks or similar structures.
Provincial and district detectives, supported by crime intelligence and forensic experts, have been mobilized to investigate the incident and track down the suspects, said police spokesperson Athlenda Mathe.
Police commissioner Tommy Mthombeni said the attackers were heartless but refused to link the killings to illegal mining until the investigation was complete.
He said all required units have been deployed and crime intelligence officials are also working in the area.
