Speaking on state TV, Awad Ibn Ouf said the army had decided to oversee a two-year transitional period followed by elections.
He also said a three-month state of emergency was being put in place.
Protests against Mr Bashir, who has governed Sudan since 1989, have been under way for several months.
Meanwhile, the main group that has been organising the demonstrations rejected the military statement and called on people to remain at a sit-in outside army headquarters.
Correspondents say protesters want a civilian council to lead the transition rather than a military one.
“I announce as minister of defence the toppling of the regime and detaining its chief in a secure place,” Mr Ibn Ouf said in a statement.
Mr Bashir’s exact whereabouts are not known.
Mr Ibn Ouf said the country had been suffering from “poor management, corruption, and an absence of justice” and he apologised “for the killing and violence that took place”.
He said Sudan’s constitution was being suspended, border crossings were being shut until further notice and airspace was being closed for 24 hours.
As the news broke, crowds of protesters celebrated outside army headquarters in the capital, Khartoum, embracing soldiers and climbing on top of armoured vehicles.
Sudan’s intelligence service said it was freeing all political prisoners, state-run Suna news agency reported.
Mr Bashir is the subject of an international arrest warrant issued by the International Criminal Court (ICC), which accuses him of organising war crimes and crimes against humanity in Sudan’s western Darfur region.
However it is not clear what will happen to him following his arrest.