It happened Sunday night in a 32-story building at 41 East 8th Street.
The victim was not seriously hurt.
Police say a neighbor was handling the gun when it accidentally went off, sending a bullet through the wall.
Twenty-nine-year-old Jonathan Hughel is charged with reckless conduct, possession of unregistered firearms and not having a valid firearm owner's identification card.