A prisoner is in a coma in hospital after his cellmate allegedly carved letters into his head and poured boiling water over his face during an argument about religion at a jail on the NSW Mid North Coast, police say.

The injured man, 40, had been sharing a cell with another man, 18, for the first time when the violence broke out at the Mid North Coast Correctional Centre in Kempsey on Thursday afternoon.

Police said the men had been placed in their cell and that section of the prison was locked down about 3.30pm on Thursday, which was standard practice.

"It is alleged an argument has begun over religious beliefs between the two, resulting in the 18-year-old carving letters into the front and rear of the 40-year-old male victim's head, before pouring hot water through a towel placed onto the victim's face," police said in a statement.

The younger man then alerted prison staff, who called paramedics.