The film's director Andy Muschietti (It) made the announcement on Thursday in an interview with Vanity Fair.
"He's a very substantial part of the emotional impact of the movie. The interaction and relationship between Barry and Affleck's Wayne will bring an emotional level that we haven't seen before," the filmmaker said. Miller's Flash's real name is Barry Allen.
Affleck and Miller will be joined by Micheal Keaton in the film who is also reprising his role as Batman. Keaton famously played the Caped Crusader in 1989's Batman and 1992's Batman Returns, both from director Tim Burton.
Miller's Flash will be traveling through different dimensions where he will meet different versions of DC's stable of characters. Affleck and Miller already teamed up in 2017's Justice League.
The Flash has no release date.
Affleck announced in February 2019 that he would not be returning as Batman after appearing as the character in 2016's Batman v Superman: Dawn of Justice, 2016's Suicide Squad and then Justice League. The actor appeared on Jimmy Kimmel Live where he retired his cape and cowl.
Affleck was also set to star in and direct his own standalone Batman film but stepped down from the project in 2017. Filmmaker Matt Reeves stepped in and will be releasing The Batman starring Robert Pattinson as The Dark Knight on Oct. 1, 2021.
Affleck's Batman and Miller's Flash will also be featured in Zack Snyder's Justice League, which comes to HBO Max in 2021.
Zack Snyder's Justice League is a different version of the Justice League film that was handled by Joss Whedon after Snyder left the project following a family tragedy. This new version will be Snyder's original vision for the film and will feature new scenes and characters.
Footage and announcements regarding Zack Snyder's Justice League, The Batman and more will be release Saturday during the DC FanDome virtual event.