Sambo Dasuki was charged on 19 counts of fraud, money laundering and criminal breach of trust at the high court in the capital Abuja.
He pleaded not guilty on all counts.
Mr Dasuki is accused of illegally transferring $50m from the national security budget to fund election campaigns for members of ex-President Goodluck Jonathan’s party.
President Muhammadu Buhari ordered his arrest two weeks ago, after a government investigation alleged that $2bn (£1.3bn) meant to buy arms to fight Boko Haram had gone missing.
He is the most senior official to be arrested as a result of an investigation into arms procurement during the administration of Mr Jonathan, defeated by Mr Buhari in the March 2015 elections.
A government investigation found that Sambo Dasuki had awarded “ghost contracts” to buy 12 helicopters and four fighter jets which never materialised. He also denies those allegations.
Islamist militant group Boko Haram has killed thousands in north-eastern Nigeria in its six-year campaign to create an Islamic state.