It happened on Monday at 12:18 a.m. near South 3rd Street and Havemeyer Street in Williamsburg.
Three men entered the building, but one went on to the fourth floor.
Video shows the man knocking on the door of the apartment and then moments later firing a shot through the door.
The round entered the apartment, where a 23-year-old man and an 18-year-old man were home at the time.
The bullet was recovered from the upper part of a couch.
The three men then took off from the building on foot.
Anyone with information in regard to this incident is asked to call the NYPD's Crime Stoppers Hotline at 1-800-577-TIPS (8477) or for Spanish, 1-888-57-PISTA (74782).
ALSO READ | Quick thinking 3rd-grade teacher in NJ saves 9-year-old boy from choking on bottle cap
* More Brooklyn news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube