The 17-year-old is currently touring Europe with his My World tour and he said it was great to welcome one of his idols to the stage.
He wrote on Twitter: 'AMAZING SHOW 2nite at the O2!! Brought out Craig David which was crazy because I grew up listening to him.'
Craig David also tweeted about his appearance.
He wrote: 'Great performing with @justinbieber tonight at his show at the o2!'
Bieber will be performing across Europe until April 14 when he will start his shows in Asia and Australia before finishing in Tokyo in Japan on May 20.