"Pepsi was trying to project a global message of unity, peace and understanding," the company said. "Clearly we missed the mark, and we apologise."
It said it was "removing the content and halting any further rollout."
The ad shows Kendall Jenner, a member of the "Keeping Up With the Kardashians" reality TV family, stepping away from a modeling shoot to join a crowd of smiling, young protesters.
The protesters cheer after Jenner hands a can of Pepsi to a police officer, who takes a sip.
More From This Section
It initially described the spot as featuring "multiple lives, stories and emotional connections that show passion, joy, unbound and uninhibited moments. No matter the occasion, big or small, these are the moments that make us feel alive." That description was also derided on social media.
The Purchase, New York, company had stood by the ad late Tuesday. But on Wednesday, it was apologizing to Jenner for putting her "in this position."
Critics say the image of Jenner handing the officer a Pepsi evoked a photo of Black Lives Matter protester Ieshia Evans approaching an officer at a demonstration in Baton Rouge last year.
Among those mocking the ad was Bernice King, who tweeted a photo of her father, civil rights leader Martin Luther King Jr., being confronted by a police officer at a protest march. "If only Daddy would have known about the power of #Pepsi," the tweet said.
It isn't the first time PepsiCo has backpedaled and apologized for an ad. In 2013, it pulled a Mountain Dew ad that was criticized for portraying racial stereotypes and appearing to make light of violence toward women.