Nenadi Usman and Femi Fani-Kayode served as finance and aviation ministers in the People's Democratic Party (PDP) administration led by former president Olusegun Obasanjo, whose tenure ended in 2007.
The defendants, who appeared before a federal high court in the commercial capital, Lagos, pleaded not guilty.
The PDP was in power for 16 years prior to President Muhammadu Buhari taking office last year. Buhari won an election mainly on his vow to crackdown on corruption.
Usman was in charge of the PDP's finances during the election campaign and Kayode was the party's head of publicity.
The EFCC said the pair, along with a company, faced a "17-count charge" in which they were accused of conspiracy, stealing and corruption.
"The accused were alleged to have stolen and illegally disbursed about 4.9 billion naira belonging to the Federal Government of Nigeria for political and personal uses," said EFCC spokesman Wilson Uwujaren.
An EFCC source said the defendants were accused of using defence money, that would have been used in the fight against militant group Boko Haram, to help fund the election campaign of the then president Goodluck Jonathan.
The source, who did not want to be named, also said they were accused of diverting a large part of the money into personal bank accounts.
The offences were allegedly carried out in January last year, two months before the election.
A number of former government officials have faced criminal charges, which they have all denied. The PDP has previously accused Buhari, a 73-year-old former military ruler, of mounting a witch-hunt against its members.
Usman and Fani-Kayode were remanded in custody and the case was adjourned until Friday.