The footage, which was posted to social media, led to the suspension and arrest of two police officers and prompted a heated discussion about South Africa's attitudes towards immigrants.
In a statement to #BBCtrending, the South African Police Service confirmed that the officers involved were from Cape Town Central police station. A spokesperson said they were "horrified" by the incident and said an internal investigation has been launched.
The independent police watchdog leading the inquiry told #BBCtrending that social media played a pivotal role in leading to the arrests.
There are approximately 17,000 registered Nigerians living in South Africa, according to a study. But it's estimated that up to a million undocumented immigrants are in the country.