The boat was about two miles off the coast of San Juan, Puerto Rico when the fire was reported. Ferry workers summoned help and began inflating orange rescue rafts.
Crew from the local police department and the US Coast Guard worked for hours to bring all 512 passengers and employees to shore. Many were in need of medical assistance, according to Fire Chief Angel Crespo.
"They are all safe. The most common medical problems we've seen are heat stroke, shock, and dehydration," Angel Crespo said.
Ferry workers said the blaze started in the engine room but quickly spread to other compartments. The boat, which is more than 560-feet long, eventually ran aground about 800 feet offshore.
The ship is owned by American Cruise Ferries. The company's website says it takes passengers between San Juan and Santo Domingo, Dominican Republic.
Coast Guard officials are now interviewing crew members to determine the cause of the blaze.