Authorities say detectives learned the suspects were rapping in a room at the Tillary Hotel in Downtown Brooklyn early Saturday morning.
NYPD officers went in and reportedly found 44 people in one hotel room.
Everyone was arrested, and five people who were allegedly spotted holding the gun on the social media stream were charged with possession of a firearm.
Police say one of them threw a gun out the window.
Officials say 36 others in the room received summonses, while three were arrested on outstanding parole warrants.
While they were streaming a rap session, law enforcement described many of them as reputed gang members.