The fire was started at the entrance to the two-story building on Jaffa Street in the city center after 03:00 (00:00 GMT), trapping the 10 Eritreans inside.
Graffiti found at the scene read: “We want the foreigners out.”
There is increasing argument and dissent in Israel over what to do with the 60,000 Africans who have entered the country illegally in recent years.
On Sunday, a new law came into force allowing immigration authorities to detain illegal migrants for up to three years.
The four Eritreans injured in Monday’s attack were taken to hospital with burns on their hands and suffering from smoke inhalation.
Israeli police spokesman Micky Rosenfeld told the BBC’s Focus on Africa program: “We believe that those individuals from the African foreign community were targeted specifically.”
He said the building had graffiti sprayed on its walls saying: “We want the foreigners out.”
In recent weeks there have been violent scenes in Israeli towns and cities where many migrants live and work, reports the BBC’s Wyre Davies in Jerusalem.
In south Tel Aviv, in particular, African-run businesses have been attacked and many migrants have been abused in the streets, our correspondent adds.
“This was the first incident which has taken place… on a level of a specific attack,” Mr Rosenfeld said.
The police spokesman said that of the 60,000 illegal immigrants living in Israel, an estimated 35,000 of them lived in the Tel Aviv area and about 5,000 in Jerusalem.
In a newspaper interview on Friday, Interior Minister Eli Yishai referred to African migrants as a demographic threat who could “end the Zionist dream”.
“We don’t need to import more problems from Africa,” Mr Yishai, leader of the religious Shas party, told Maariv.
“Most of those people arriving here are Muslims who think the country doesn’t belong to us, the white man.”
One politician from the governing Likud Party recently compared asylum seekers to “a cancer.”
While such language has been deplored by human rights groups, politicians from right-wing parties in the governing coalition say something has to be done about illegal immigrants who are mainly from Sudan, South Sudan and Eritrea, our correspondent says.
They blame the migrants for a rise in crime and say they could eventually undermine Israel’s Jewish majority.
The Israeli government also dismisses claims that the migrants, who cross the Sinai desert at the rate of 2,000 a month, are fleeing persecution in their own countries.
Prime Minister Benjamin Netanyahu recently described African migrants as “infiltrators” who had come here for economic reasons and who were a problem that had to be “solved”.
The new law will allow immigration authorities to detain illegal migrants for up to three years, without trial or deportation.
An interior ministry spokesman said it would hopefully stem the flow of Africans entering Israel illegally across the vast desert border with Egypt.