A press release regarding the casting of Dane DeHaan as Harry Osborn in the Sony Pictures film has substantiated the rumours that the actor will take on the role of the villainous Electro.
"[He's a] genius electrician-type person and he gets the short end of the stick from the whole world," Foxx told ET.
"[T]he next thing you know, he turns it on."
Electro was rumoured to be the mysterious figure - portrayed by Michael Massee - that appeared during the credits of Marc Webb's debut Amazing Spider-Man film earlier in the year.
Foxx will next be seen in Quentin Tarantino's Django Unchained.
The Amazing Spider-Man 2 will also star Andrew Garfield, Emma Stone and Shailene Woodley. It is scheduled for release on May 2, 2014.
Gallery - The Amazing Spider-Man: