The city was formally established in 1886 with the discovery of gold and the Witwatersrand reef. After the discovery, the population of the city exploded, and Johannesburg became the largest city in South Africa.

The new settlement was named after two officials of the Zuid Afrinaansche Republijk ZAR, Christiaan Johannes Joubert and Johannes Rissik, who both worked in the land surveying and mapping. It is widely believed that the two men combined their common name to which they added burg, the archaic Afrikaans word for fortified city.

After the National Party took power in 1948, it instituted the Group Areas Act and forcibly moved black population groups out of inner Johannesburg areas, such as Sophiatown, to the newly developed Soweto, a name derived from South West Townships. Today the city of Soweto has more than 1 million inhabitants.

The milestone event in the black resistance movement that eventually overthrew apartheid and white dominance came on June 1976, when South African police opened fire on a student protest in the black township of Soweto. An unrest continued through the 1980s, with massive violence erupting in Johannesburgs black townships again in 1984.