The Oscar winner will star opposite Henry Cavill, who will reprise the role as Superman from the original, with Zack Snyder returning to direct. The sequel, which does not have an official title yet, is scheduled in theaters July 17, 2015.
"Ben provides an interesting counter-balance to Henry's Superman," Snyder said in a statement. "He has the acting chops to create a layered portrayal of a man who is older and wiser than Clark Kent and bears the scars of a seasoned crime fighter, but retain the charm that the world sees in billionaire Bruce Wayne. I can't wait to work with him."
Amy Adams and Laurence Fishburne are also expected to return for the sequel as Lois Lane and Perry White.
This isn't Affleck's first time playing a superhero. The actor starred in Daredevil in 2003 and portrayed 1950s Superman actor George Reeves in 2006's Hollywoodland.
“We knew we needed an extraordinary actor to take on one of DC Comics’ most enduringly popular superheroes, and Ben Affleck certainly fits that bill, and then some," said Greg Silverman, Warner Bros. president for creative development and worldwide production. "His outstanding career is a testament to his talent, and we know he and Zack will bring new dimension to the duality of this character.”
Snyder announced that the two superheroes will team up in the film at last month's Comic-Con in San Diego.