The rapper is the special guest for the main stage on Saturday, June 23, which will be headlined by Jay-Z.
A BBC insider said: "Nicki is one of the biggest stars on the planet right now. It's great that she has chosen Radio 1's Hackney Weekend as her first UK gig of the year. I am sure she'll have a few surprises up her sleeve for her fans."
Kasabian, Ed Sheeran, Leona Lewis and Rizzle Kicks will also play the main stage on the same day in what will be the radio station's biggest ever free-ticketed event.
Rihanna will headline the Sunday, June 24 lineup and will be preceded by Florence + the Machine, Tinie Tempah and Jessie J. A special guest for Sunday's bill has yet to be announced.
100,000 tickets have been handed out for the event, which is being held in one of the official London 2012 Olympics host boroughs to celebrate the Games coming to the UK.
Watch the music video for Nicki Minaj's 'Starships' below: