Spader will play Ultron, an AI with a robotic body and super-strength, in the Joss Whedon-directed sequel, Marvel has confirmed.
The Emmy Award-winning actor can next be seen on NBC's The Blacklist in September. He recently appeared in Steven Spielberg's Lincoln and had a recurring role as Robert California in The Office.
Whedon recently discussed his plans for Ultron in the sequel, saying that the character is "not a happy guy".
"I knew right away what I wanted to do with him," Whedon said. "He's always trying to destroy the Avengers, goddamn it, he's got a bee in his bonnet.
"He's not a happy guy, which means he's an interesting guy. He's got pain. And the way that manifests is not going to be standard robot stuff."
The Avengers: Age of Ultron will open in cinemas on May 1, 2015.
Photo gallery - Marvel at the movies: