The teenager charged with murdering 19-year-old Michelle Morrissey in Mudgee in central western New South Wales has been shot while allegedly fleeing custody.

Luke Cotterill, 18, was being transported from Bathurst to a mental health unit at the Metropolitan Remand and Reception Centre in Sydney when it is alleged he tried to escape.

Corrective Services Commissioner Ron Woodham says Cotterill was confined to an isolation cell on the bus after other prisoners threatened to kill him.

Through the CCTV view of the cell, the two guards on the bus witnessed him attempt to hang himself.

After pulling over on the Great Western Highway, one guard entered the cell unarmed where Cotterill appeared to be unconscious.

It is alleged that Cotterill then kicked the guard and ran outside.

He was then shot three times - once in the hip, leg and arm.

Commissioner Woodham believes the guards did their job.

"If they want to play those games and run away from us there's a price they'll pay, and they could get hurt," he said.

Cotterill is now in a stable condition at Westmead Hospital.