The workers were in the engine bay of a haul truck adjusting chains while installing the engine module.
The NSW Resources Regulator said the module moved unexpectedly.
"The workers had to jump clear to avoid being hit or crushed," it said.
"Both workers were uninjured. The incident was not immediately reported to the supervisor."
The regulator said it was vital to have clear and concise communication between work parties and workers in control of the crane during lifting operations.
"Manufacturers should review risk assessments and procedures to ensure that the hazard of unplanned movement during lifting engine modules into or out of haul trucks is considered, controls are in place, and that this is clearly communicated to workers," it said.
"When an incident occurs, workers must clearly and accurately convey the events related to an incident or near miss to their supervisor."