Those with carbon monoxide poisoning were taken to hospital by ambulance after the incident and were discharged a short time later after being assessed and treated.
Two men, one in his early 20s and one in his late 30s, were kept overnight for further treatment and were said to be in a stable condition this morning.
A Fire Emergency New Zealand spokesman said the turbo unit on the engine blew and billowed exhaust fumes, causing the workers in the hold to be affected.
Other port workers were able to remove the digger from the hold before the fire service arrived.
It is understood the digger may have briefly caught fire but was out by the time fire crews arrived.
There had been no fire danger to the ship.
Firefighters in full breathing protection gear checked the hold to make sure the carbon monoxide had dissipated and helped paramedics treat the affected workers as well as a couple of ship's crew members also affected.