After 10 years advertising the fizzy pop brand, Beckham, 33, will not be renewing his contract, which was reportedly worth £2 million a year.
The 33-year-old father-of-three, who is on loan to AC Milan from his US team LA Galaxy, said: 'I have nothing but good memories of my association with Pepsi.
Giving it up: David Beckham poses with Beyonce and Jennifer Lopez to promote soft drink Pepsi - but the England star will no longer appear as the face of the brand
'I've played a gladiator, a cowboy, a surfer, and worked alongside Beyonce and Jennifer Lopez as well as some of the biggest names in world football.
'I hope everyone who has seen the work enjoyed it as much as I enjoyed making it.'
It is understood the end of the Pepsi deal will leave Beckham more time to focus on other products.
Pepsi ad with Lopez, Beyonce, Beckham
A PepsiCo spokesman said: 'Pepsi is proud to have worked with David Beckham for 10 years, during which time he has been among the most successful and inspiring international footballers of all time.
'Our partnership has been one of the most enduring in global brand history and David will always be part of our Pepsi family.
'David's football legacy will live on and everyone at Pepsi will continue to be as passionate about his success as we have been over the last 10 years.
Fight on his hands: Becks dressed up as a gladiator for Pepsi back in 2004
'We wish David well with the many projects he is pursuing and look forward to the possibility of partnering together with him again someday.'
In April Which? wrote to Beckham to complain that he and other stars were promoting unhealthy products to children.
The magazine said such promotions were "extremely disappointing" and footballers should use their influence to encourage children to have a healthy diet.