The agency change follows the merger of T-Mobile and Orange, creating the UK's biggest network.
Vodafone, meanwhile, is looking to reposition with a fresh identity. The switch also follows the end of O2's exclusive iPhone deal.
The mobile network was one of VCCP's founding clients and has worked with the agency since 2002. The extension of the agency's role to incorporate digital is part of a push by O2 to introduce a more integrated approach to marketing.
The brief includes strategic digital planning, social media and online advertising, as well as website development and eCRM across O2's brands.
The appointment puts an end to O2's relationship with Agency Republic, which had held the account since 2002.
O2 spent £15m on online advertising in 2009, excluding paid search, making it the UK's biggest-spending digital marketer by a margin of £5m, according to Nielsen.