"When we pulled up we had fire coming out of all windows, and the porches were on fire in the back," Yonkers Fire Commissioner Anthony Pagano said.
Fire officials feared the flames might jump to other buildings because they are inches apart.
Firefighters managed to keep the fire contained to the apartment building. It was under control by early Thursday evening, but they were still hosing down hot spots.
Investigators are not sure how this fire started.
"There are reports of electrical problems, but our investigators have not gotten in yet. And they probably won't until sometime in the morning," Pagano said.
No injuries were reported.