The FDNY Marine units responded to a 23-foot pro-line that was on fire out in the middle of Raritan Bay.
Five civilians on board jumped in the water and were rescued by a good samaritan boat nearby, the fire department said.
Three people aboard were taken to a hospital, the FDNY said, while two others were treated at the scene.
Officials said they are urging New Yorkers to have a plan for safe boating every time they head out on the water.
"Make sure to have a fire extinguisher, first aid kit, gloves, a warming blanket, CPR mask and carbon-monoxide detector on your boat," the FDNY said. "Bring a Marine VHF radio, so that in case of emergency you can contact the USCG and FDNY."
For more summer safety boating tips, follow @uscgnortheast.
The Associated Press contributed to this report.
* More New York City news
* Send us a news tip
* Download the abc7NY app for breaking news alerts