Ruben Espinosa, who worked for the investigative magazine Proceso, had recently moved to the city from the eastern state of Veracruz where he said he had been threatened and harassed.
Veracruz is considered one of the most dangerous Mexican states for journalists to work in.
They are often the targets of organised crime linked to drugs gangs.
Proceso said the killings were discovered in the Narvarte neighbourhood of Mexico City a day after Mr Espinosa's family lost contact with him.
The other four victims were all women. Three of them had lived in the apartment and the fourth was a domestic employee, the city prosecutor's office said.
Officials said identifications and cause of death were still being verified. However, Proceso said Mr Espinosa had suffered two gunshot wounds.
Many journalists under threat in Mexican states have taken refuge in the capital and the government has set up an agency to help protect them.
Free speech advocacy group Article 19 said Mr Espinosa was the first journalist to be killed while in exile in Mexico City.
It said his death marked a new level of violence against journalists in Mexico.
Earlier this year, the National Commission on Human Rights said 97 journalists had been killed in Mexico in connection with their work since 2010.
A Mexican photojournalist has been found dead along with four other people in a flat in Mexico City.