He wrote on twitter: “I gave the majority of the money I made on the voice to the @PrincesTrust to build a tech program to get the kids from east London up to speed”.
The Black Eyed Peas star, 37, said that he gave the funds away to the British people because he has felt well-received in the country.
He said: “The people of the UK welcomed me into their homes every week and I wanted to give something back.
“I called my manager and said, ‘What can I do with the money that I’m getting for ‘The Voice’? I don’t need it’.
“It’s the least I could do — the show changed my life.”
The music producer met up with Prince Charles who is the figurehead for the Trust at the press conference.