Ferrell told The AV Club he had long enjoyed his co-star's character Seth Galifianakis, who appeared in sketches as Zach's effeminate twin.
"This all came about from me personally wanting to work with Zach, and seeing a character he had done [called Seth Galifianakis] that became Marty Huggins, and thinking it was one of the funniest characters I had ever seen," Ferrell revealed.
"Selfishly trying to think of a project where I could piggyback on that. That kind of morphed, after a couple of discussions with people, into, 'If you're going to do Southern characters, why don't you do something about the election process, like two duelling congressmen?'"
Co-star Galifianakis suggested that The Campaign could actually educate young voters on how much money is spent on political attack ads.
"I think the one thing the movie may be able to do, for the 17-year-olds who don't know about this stuff, is to show them the money - how it so affects the process, and how it's just gross," he quipped.
"[Will and I] were just talking about the length, how long the campaigns are. It's two years. The amount of money that the candidates and parties would save if we just said, 'You've got 90 days'. Cut out the bulls**t a little bit."
Galifianakis previously disclosed that his naive Campaign character Marty Huggins was partially based on Sarah Palin.
The Campaign is now playing in the US and opens in UK cinemas on September 28.
Watch a trailer for The Campaign below: