Police detected a strong smell of gasoline coming from the apartment, and they believed he may have a young child inside.
The area around the Queensbridge Houses was cleared out, and some residents were not allowed to enter the building.
The standoff ended peacefully just after 6 p.m.
The Queensbridge Houses is a 3,142 apartment complex run by the city Housing Authority.