The studio said Affleck will star opposite 30-year-old Henry Cavill, who will reprise his role as Superman from "Man of Steel." The movie will also feature "Man of Steel" stars Amy Adams as Lois Lane, Laurence Fishburne as Perry White, and Diane Lane as Martha Kent.
"(Affleck) 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," said Snyder. "I can't wait to work with him."
Production on the as-yet-untitled film is expected to begin in 2014 for release July 17, 2015.
It won't be Affleck's first time in superhero garb. He played a blind Marvel crime fighter in 2003's "Daredevil" and portrayed 1950s Superman actor George Reeves in 2006's "Hollywoodland."
Affleck's "Argo," which he starred in and directed, won the Academy Award for best picture earlier this year.