The appointments, which come four months ahead of planned presidential elections, are subject to approval by parliament, a presidential spokesman said.
He gave no reasons for the reshuffle.
Mr Goodluck has not yet said if he will stand in the elections scheduled for January.
The president promoted the former head of the air force to chief of defence staff and named new air force, army and navy chiefs.
They replace officers who had been due to retire at the end of August, a presidential spokesman said.
Mr Goodluck also appointed new heads of the Nigeria Police Force and the State Security Service.
The reshuffle of security leaders comes a day after at least 700 prisoners escaped during an attack on a jail in northern Nigeria.
Four people died in gunfire after members of the militant Islamist sect Boko Haram attacked the prison.
Some 150 suspected members of the sect where among the detainees who escaped, officials said.
Source: BBC News