He has sold 18 million albums and worked with everyone from Justin Timberlake to U2 - but that's not enough for Will.i.am. The talent behind Black Eyed Peas tells Craig McLean why he's going head-to-head with Facebook - oh, and how he ensured Barack Obama's election victory

Will.i.am had a good presidential inauguration. At the January celebrations to mark Barack Obama's assumption of power, the Black Eyed Peas songwriter/producer played five shows in Washington, one on the steps of the Lincoln Memorial followed by appearances at four of the evening's biggest balls. As he had been on several occasions before, Will.i.am was up close and personal with the new 44th President of the United States.

"That's a very, very charismatic family," observes the man known to his mum in Los Angeles as William Adams. "His wife, she's very strong. We think Obama's a great speaker but that girl, she's awesome." Only those particularly intimate with the White House, one suspects, would call the First Lady "that girl".

How do we know that Will - let's call him Will from hereon in, as most of his friends do - had a good inauguration? Because he filmed the backstage action on his specially customised BlackBerry and immediately "blasted" the footage out to the 1.5 million subscribers to Dipdive. He was "closer than the CNN cameras" to the action. Hence the footage of Obama chatting with Bruce Springsteen and Obama rocking out at the side of U2's stage.

What's Dipdive? That's Will's own social-networking site, what he calls a "lifestyle engine". He invented it, employs 25 computer-code writers to keep the technology ahead of the curve, and spends $150,000 a month developing it into a proper entertainment network. "This is Twitter times a billion," he says. "Twitter is, like, a picture and 140 letters. This is video, MP3s, blogs ..." Will was centre-stage in Washington at the personal behest of Obama.

The commander-in-chief owed the guy responsible for 2005's breast-themed hit single My Humps (which he says he originally wrote for the Pussycat Dolls), and not because the presidential daughters really dug Black Eyed Peas' role in Garfield: A Tail of Two Kitties (in the film, the LA-based quartet - Will, female vocalist Fergie and rappers Taboo and apl.de.ap - played the musical act that made the saggy moggie dance). The fastidious President may not approve of the "authentically" hip-hop and grammar-flouting way he writes his name, but he was a fan of Will's musical contribution to his election campaign.

Yes We Can was the viral song that roared: Will took Obama's speech during the Democratic Primary in New Hampshire in January 2008, set it to music, called in some of his big-shot friends to appear in the video - the actor Scarlett Johansson, the soul singer John Legend, the model Amber Valletta; Bob Dylan's son Jesse directed it - and released it on the internet. Within two days it had been viewed online two million times. Forty-eight hours later, the day of the Super Tuesday Primary, that figure had doubled to four million.

"It was," claims Will with some pride, "the fastest-moving piece of content in the history of the internet. I think I hit a nerve in the emotion of people. And I think I married the right emotion with the emotion of the speech."

Mindful of Black Eyed Peas' 18 million album sales, and of Will's status as a hit producer of other artists (Justin Timberlake, Michael Jackson, U2, Mary J Blige), the Democrats had been keen to have him on board. They initially asked if they could turn his song I Got It From My Mama (from his 2007 solo album Songs About Girls) into a campaign jingle: "I got it from my mama, I'm voting for Obama". But as he told his lawyer, "Dude, if you use that as the song, he'll never be our President."

Because it was too naff?

"No. It's the wrong emotion. You don't send that party emotion out at a time when America's in a bad place, when there's nothing to celebrate. Dude, you got to make people cry with this song. It can't have no drums on it, cos if you have rhythm it'll suggest only a certain demographic agrees with whatever it is he's doing. It should only have guitar - and it should only be percussive or rhythmic by the way the guitar is plucked."

Thus the baby boomers, as well as the pop/hip-hop kids who are the Peas' core audience, would get the song.

"And it should cry like Blackbird by The Beatles. The chord progression should cry ..." Moved by Obama's rolling, lyrical rhetoric, Will could do his job. "I was now inspired, to think and dream. That's why I chose Obama over Hillary. He sparked my imagination."

Kingmaker. Activist. Hit machine. Tech pioneer. The 34-year-old Will is considerably more intriguing and multifaceted than Black Eyed Peas' mainstream, radio-rattling pop hits (Don't Phunk With My Heart, Let's Get it Started, Where is the Love?) would suggest. Don't hate him because Fergie singing about her "lovely lady lumps" is, in pop-culture terms, surely evidence of the end of days. As demonstrated by the band's surprisingly thrilling new album, The E.N.D. - a heavy dance album with synth-knobs on - Will has a lot more up his quirkily fashioned sleeves. We'll come to his designer-clothes label and Hollywood acting career in a minute.

Right now, here in Miami, this hip-hop renaissance man is having a very good Winter Music Conference (WMC). He and the rest of Black Eyed Peas are bouncing around the main stage of the open-air Ultra Music Festival, the biggest event at this annual showcase for the world's hottest dance music and club-friendly artists. DJs, labels, remixers, producers and bands are performing and cutting deals all over town.

The BEPs are using the WMC to showcase tracks from The END, their fifth album (it stands for The Energy Never Dies). Will is also DJing at various clubs, and Fergie is celebrating her birthday. It is, clearly, party time.

Taking to the Ultra stage after the Ting Tings, Will leads the band he co-founded in the late 1990s through a lively, if chaotic, show. They're still working out how to perform these new, techno- and house-flavoured tunes live. Things only gel during the penultimate song, a jump-around party tune called I'm in Miami Bitch by a group called LMFAO (Laugh My F*ckin Ass Off). They're signed to Will's self-titled record label, and on stage, the duo and the Peas are bolstered by the appearance of dancing girls in red bikinis. Then, for the finale, a performance of the Black Eyed Peas' new single Boom Boom Pow: at time of writing it has been number one in the US for six weeks, selling almost one million copies. More millions in the bank for a man who owns a Bentley GT coupé and a Tesla Roadster (the electric sports car) but who grew up hardscrabble poor in east LA.

William Adams and his older brother were raised in the projects by his single-parent mum (who works with children in after-school programmes). Aged 25, when a passport application resulted in him seeing his full birth certificate for the first time, he found out that his real, full name was William James Adams Jr. He was named after the father he'd never known, and whom no one in his family ever discussed. "That's not your dad; I'm your dad," his mum told him when confronted with his discovery. "When people make mistakes, as far as people that they fall in love with ... Well, that man doesn't have the right to be called your dad. That's a very powerful name that you have. You've utilised it. It's his fault that he didn't live up to that name."

For Will, who's "supertight" with his mum, that was explanation enough.

His mum sounds like a formidable character. She ensured he sat an exam to secure a place at a "rich school outside the ghetto". He and his brother had home-made clothes, and the sound of Earth, Wind & Fire and Luther Vandross was a sign that she was busy with the housework. She wouldn't let him play more than a few yards away from their home, even if the neighbourhood kids were there. "You don't know what they're playing with - they could be playing with dogshit," he recounts with a smile. "If you want them to come play with you, you come up with a game to make them wanna come play with you. You ain't got no business following people." Will, an easy, rolling raconteur in conversation, laughs. "That's my mom for you."

I've met Will the day after the band's appearance at the Ultra event. He rocks up in grey beanie, silver V-necked shirt open to his chest, salmon-pink knee-length shorts, calf-high socks and silver Yves Saint Laurent baseball boots. It's more English preppy than your normal hip-hop streetwear, and is as we might expect from the man who, inspired by his thrifty mom and her way with a sewing machine, studied fashion at LA's Institute of Design & Merchandise before committing full-time to music.

Nearly full-time: he has his own fashion label, i.am clothing, which makes Black Eyed Peas' stagewear. Like Jay-Z, P Diddy and Justin Timberlake, Will is a multi-platform brand portfolio. "Actually, Justin and I were gonna start a production team called JAWbreakers, which stood for Justin and Will." But despite their previous hit-rate - together they wrote Where is the Love?, and Damn Girl from Timberlake's second album - "it didn't really take off".

No matter: Will has an ongoing creative partnership with John Legend - they worked together on American Boy for Estelle. And while he won't divulge details, he's hopeful, too, that the songs he's co-written for Michael Jackson's long-awaited new album will finally see the light of day.

In the studio, Will starts fiddling with his laptop. Under his armpits, he wears twin holsters. One for each of his BlackBerrys. Throw those into the sartorial mix and he looks like a cross between a dandy highwayman and a golfing cowboy. He's accompanied by a girl sporting micro-shorts, vertiginous heels, cascading hair and, well, mountainous lady lumps.

He's supposed to play me a few tracks from The E.N.D. He plays all of it, then some tracks that didn't make the finished album. And then some different versions of songs that didn't make the finished album. A man who's never less than enthusiastic about his own music, Will jiggles in his seat as he mans his laptop, playing tune after tune at earwax-loosening volume. It is, again, a lively if chaotic one-man show.

His reaction is understandable: the songs are brilliant. I Got a Feelin', a collaboration with French DJ David Guetta scheduled to be the second single, is a monster floor-filler. Now Generation is clangy rock 'n' roll that suggests The Strokes on ecstasy. Alive is like a jazz Daft Punk. In a year that indie guitar music is dying on its skinny-jeans-clad arse and electronic music is storming back, savvy Will is ahead of the curve again.

He got into club music, he says, while he was in Australia filming the part of the teleporting mutant John Wraith in the new X-Men movie X-Men Origins: Wolverine - his second film this year after his vocal role as hippo Moto Moto in Madagascar: Escape 2 Africa, and a gig he landed after the head of 20th Century Fox saw Yes We Can.

Will spent his time off-set in Sydney's clubs, soaking up the Chemical Brothers and Diplo remixes being spun by visiting DJs such as Italian duo the Crookers. Arriving back in the US and reuniting with his Black Eyed Peas bandmates, he told them that this - dance music, not hip hop - was the stuff inspiring him now. So Will set about creating his own beat-heavy electronic tunes.

It's this analytical but also instinctive approach that appealed to U2. They hired him to produce I'll Go Crazy if I Don't Go Crazy Tonight, the funkiest song on their recent No Line on the Horizon album. "We'd heard how great he was to work with," U2's guitarist The Edge tells me, "and I think Black Eyed Peas are a great band. I've been thinking for a long time that hip hop and R&B production is really more innovative than rock'n'roll production these days. And we just really hit it off. Will was amazing - in a few hours he'd taken the demo of Crazy Tonight up several notches. It's just a different [musical] sensibility, and I learnt a lot from him. He's got an amazing instinct, particularly for rhythm."

The hook-up came via Jimmy Iovine, legendary head of Interscope Records in the US. "I never met my dad so Jimmy - outside of my uncles - has been a father figure," says Will. "I've been signed to Interscope for 12 years, so it's family."

This family, he says, "didn't like" his Dipdive idea at first, "but they can't do anything about it". Just as he plans on releasing, monthly, different mixes of the songs from The E.N.D, and versions that fans can mix themselves, to open up the "closed capsule" that is recorded music, he wants to use Dipdive to revolutionise the concert experience.

"So when we play live, we ask people to leave on the Bluetooth on their cellphones. So the song is pumping out data. We'll be playing Where is the Love? and when the chorus comes on, we'll send them something via Bluetooth: messages, ringtones, pictures. Whatever content you want."

No wonder the label wasn't enthused. But you can see the appeal to a self-starter like Will, whatever the risk. As his mum told him, he shouldn't ever be following anyone.

Who: Will.i.am of the Black Eyed Peas.
Born: William J. Adams, March 15, 1975, Los Angeles.
Solo albums: Lost Change (2001), Must B 21 (2003); Songs About Girls (2007).
BEP albums: Behind the Front (1998); Bridging the Gap (2000); Elephunk (2003); Monkey Business (2005).
Production/songwriting credits include: Justin Timberlake, John Legend, Kelis, Nas, The Game, Mariah Carey, Whitney Houston, Michael Jackson, Sergio Mendes, Carlos Santana, Pussycat Dolls, Busta Rhymes and Fergie.
Also: Appearing in movie Wolverine.
Latest: New BEP album The E.N.D .
When: Out June 8.