Slavery was a mainstay of the labor force of the Cape Colony between its foundation by the Dutch East India Company (VOC) in 1652 and abolition in 1834, by which date the Cape was under British rule. Slaves were transported to the Cape from a wide range of areas in the Indian Ocean world, including South and Southeast Asia, Madagascar, and Mozambique. Some were owned by the VOC and labored on the Company farms, outposts, and docks. The majority were sold to settlers and worked as domestic servants in Cape Town or as laborers on the grain, wine, and pastoral farms of the Cape interior.
Throughout the 18th century slaves outnumbered settlers. Although there were few major revolts, individual resistance was widespread and desertion common. Some runaways joined indigenous groups in the Cape interior, while others formed more isolated maroon communities. Toward the end of the 18th century some slaves claimed individual rights, reflecting the influence of wider revolutionary movements in the Atlantic world. A revolutionary uprising took place in 1808, shortly after the abolition of the slave trade and the takeover of the colony by the British.
In the early 19th century slave resentment continued to grow, especially as a boom in wine production increased labor demands. In the 1820s and early 1830s abolitionist voices were heard in the colony, and slavery was ended at the same time as that in the British Caribbean and Mauritius. Unlike these other British colonies, Cape slaves largely continued to work as farm laborers, and their living and working conditions produced the continued impoverishment of farmworkers in the western Cape region.
Slaves played an important part in the creation of a distinctive creolized Cape culture, notably in the development of the Afrikaans language and Cape musical and culinary traditions. They were also responsible for the growth of Islam in Cape Town and its hinterland, which took a distinctive form influenced by its Southeast Asian origins.