"Dog Fight," due Aug. 10, stars Ferrell and Galifianakis as bumbling, rival politicians battling for a congressional seat in North Carolina. All three are producing the movie, along with frequent Ferrell collaborator Adam McKay.
It is not yet clear what role Aykroyd will play in the Jay Roach-directed film, however.
Ferrell and Galifianakis have some history with politics. Ferrell famously spoofed President George W. Bush on "Saturday Night Live" and in his HBO special, "You're Welcome, America — A Final Night with George W. Bush." Galifianakis' real-life uncle Nick Galifianakis served in Congress from 1967 to 1973.
For his part, Aykroyd played President Jimmy Carter in a presidential reunion sketch featured on FunnyorDie.com, which was co-founded by Ferrell and McKay.
"Dog Fight," distributed by Warner Bros., also stars John Lithgow, Jason Sudeikis, Dylan McDermott, Thomas Middleditch and Brian Cox.
The film was written by "Eastbound & Down" scribe Shawn Harwell and one of the HBO show's executive producers, Chris Henchy.