A large black cloud of smoke and pockets of flames, could be seen coming from the ship, and an "unreal" number of explosions were heard by those close by.
Firefighters on the ship announced at 1.30pm that the fire was under control.
The exact cause of the fire, and what damage it caused, has yet to be announced.
The spokeswoman said the crew were transferred to a facility at the port.
The ship's engineer and captain stayed on board to help firefighters quell the flames.
A Hawke's Bay District Health Board spokesperson said all the crew tested from the cargo ship following the fire had since tested negative to COVID-19.
The crew will remain on board the vessel until it departs.
A total of 19 fire engines attended the blaze, including crews from Palmerston North, and one ambulance was on standby.
Firefighters and the ship's engineers battled the fire on board the ship, while other crews cooled the side of the boat with water.
A Napier Port spokeswoman said everyone was "safe and accounted for".
The port's annual shareholder meeting was taking place at the Napier War Memorial Centre when the fire broke out.
The spokeswoman said a member of the Napier Port senior management team left the meeting to manage the fire.
She said the chairman was told about the fire during the meeting.
"The meeting was able to continue as planned without disruption."
The Kota Bahagia, a 161m-long cargo ship built in Singapore in 2011, docked at the port at 3am yesterday.
A witness said the ship had wind turbines aboard.
Local Bryan Edwards said he was informed this afternoon that his newly purchased freeze dryer was on the ship.
"We're told our cargo stuff is right under where the fire is. It's disappointing to be honest," he said.
Truck driver Stuart Markham, who was in a queue at the port's container terminal, said he and six other trucks heard a number of "internal explosions" before being evacuated.
"The amount of bangs going on was unreal," he said.
Markham said smoke billowed from under a crane on the ship, before another explosion about noon.
A witness said people at the Bluff Hill lookout, which provides a panoramic view of the port, initially packed the viewing platform to watch before thinning out as they started coughing.
"Smoke on Hornsey Rd is making it hard to breath. Our faces are beginning to sting."
Police wearing masks urged the public to stay away from the lookout, warning that the fumes could be toxic. A number of roads including Breakwater and Battery Rds were closed.
One of those on the hill was local Sam Holmes.
"I heard a bang, and then I smelled smoke, and I looked outside and this ship down here at the port was on fire.
"Apparently it's something to do with chemicals, I hope the [firefighters] and staff down there can sort it out as soon as possible."
Jones encouraged nearby residents to keep windows and doors shut to keep the smoke out.
He said symptoms, which include irritated eyes, nose, throat and airways, as well as sore throat, coughing and difficulty breathing, often disappear soon after exposure.
"People who have difficulty breathing, have a prolonged cough or tightness in their chest should call their GP or Healthline," he added.
Port operations had been stopped for the day but limited bulk cargo operations were expected to resume by 3pm, when the road cordons blocking traffic to the port were also expected to be lifted.
The fire also led to the cancellation of one KiwiRail service from Palmerston North to Napier.
Container operations, including container receiving and delivery, were to be closed at the port for the rest of the day and reopen at 7am tomorrow.