The Yellow Dogs band lost two members, while another artist was killed by Ali Akbar Mahammadi Rafie a fellow musician, who then killed himself.
Police said they believe the murders took place as Rafie, who was 29, was upset following his being kicked out of another music group.
Two of the four killed were brothers and members of Yellow Dogs, who considered themselves on Twitter to be a Post Punk and Dance Punk band from Tehran, who were living in Brooklyn.
Two of those murdered had just been granted political asylum by officials in the U.S.
Gunfire could be heard on Monday as Rafie climbed onto a terrace on the third floor from a nearby roof where he started shooting through an open window. He killed Ali Eskandarian, a musician, said the NYPD.
On the same floor of the apartment police found dead, Arash Farazmand, who was the drummer for Yellow Dogs.
Soroush Farazmand, his brother, the guitarist for the band, was using a laptop in his bedroom when he was killed by gunshots.
Two other members of the Yellow Dogs group were not at the apartment when the shooting took place.
Police said another tenant who was not identified was hit by a gunshot in the arm, when Rafie struggled with a former band mate form Free Keys, the group that had kicked him out.
Rafie was able to retrieve more ammunition that had dropped out of his gun, went up to the roof and then shot himself, said police.
Rafie had been upset he was not in the group any longer said a spokesperson from the NYPD.
Investigators said they believe Rafie and the other members of Free Keys, might have argued over money, but it was not clear why he shot the Yellow Dogs band members.
Police found the rifle used in the attack next to the body of Rafie on the roof of the building, said Ray Kelly the NYPD Commissioner.
The firearm was purchased in 2006 in New York and police were investigating its history.