The announcement came as the holy month of Ramadan began in the world's largest Muslim majority country, and the government has already banned citizens' traditional annual exodus from the cities to the provinces during the holiday period.
The ban on sea travel took immediate effect, but the ban on air travel will start on Saturday so that some pre-booked flights can go-ahead.
The ban will apply across-the-board until May 31. The ministry had previously given different dates for the end of the ban for different modes of transport.
Cargo transport is exempted. Other exceptions would include flights to repatriate Indonesian and foreign citizens, as well as travel by state officials, diplomatic staff and representatives of international organisations, the officials said.
The country's biggest airlines include state-run Garuda Indonesia and budget carrier Lion Air.