A 17-year-old girl was murdered inside her Coney Island building early Tuesday, police said.

The unidentified teen was with a 20-year-old man when the gunman confronted them inside a building at the Site 8 Houses on W. 35th St. near Surf Ave. around 4:30 a.m.

The girl was shot in the chest and died at Coney Island Hospital.

The man was grazed on the arm and was taken to Lutheran Medical Center.

Police are investigating whether the pair may have been shot by the girl’s 25-year-old ex-boyfriend.

No arrests have been made and the investigation is ongoing, police said.