Saudi King Salman also replaced the heads of the ground forces and air defences.
The news was published by the official Saudi Press Agency (SPA), but no reason for the sackings was given.
They come as the war in Yemen, where a Saudi-led coalition is fighting rebels, is nearing the end of its third year.
Crown Prince Mohammed bin Salman, who is also the defence minister, is believed to be behind various recent shake-ups in the country.
Last year dozens of prominent Saudi figures, including princes, ministers and billionaires, were locked up in Riyadh's five-star Ritz-Carlton hotel as the prince led a drive against corruption and abuse of power.