The ad was developed by a black rapper. It depicts a battered white woman on crutches being urged to identify a suspect out of a lineup of black men.
A talking goat in the lineup makes threatening comments to the woman, such as "Ya better not snitch on a playa."
The woman eventually screams "I can't do this, no no no!" and runs away. The word "do" is in apparent reference to the soft drink's "Dew It" slogan.
The company said it immediately pulled the 60-second spot after learning that people found it offensive.
A spokeswoman for PepsiCo didn't explain the approval process for the ad but said it was never meant to run on TV.
The Associated Press contributed to this report.