An inquiry investigating corruption in New South Wales prisons has heard from an inmate who claims he was bashed by guards who then planted drugs in his cell.

The prisoner known as "A" was in Lithgow Jail in April 2014 when his cellmate sent an abusive message via an intercom system to the Prison Governor John O'Shea demanding a television.

Prisoner A told the inquiry the message prompted a senior officer to visit his cell.

Today in the witness box he identified the officer as Mr O'Shea, who allegedly said "do you want to be tough through the intercom, do you?".

Video shows police searching the inmate's cell. Picture: 9NEWS (9NEWS)

A white tablet was found in the cell, but ICAC is looking at whether it was planted there by guards. Picture: 9NEWS (9NEWS)

Prisoner A said moments later, at least three prison officers piled into his cell and began attacking him.

"They were kneeing me in the ribs and giving me upper cuts, I remember blacking out," he said.

The inquiry heard evidence that Prisoner A was treated in hospital for lacerations and bruising and in a report of the incident, he stated the injuries were caused by "himself".

Mysteriously, there was no CCTV or other video evidence of the incident but the prison guards had a camera rolling the next day when they searched the inmates' cell.

The footage shows an officer finding a tablet hidden in his asthma spray.

The inmate said guards bashed him and planted the tablet. Picture: 9NEWS (9NEWS)

The ICAC inquiry is investigating whether the drugs were planted by one of the officers.

At the time, Prisoner A chose not to report the assault fearing further payback, including loss of visitation rights.

But today he was compelled to give evidence, which he conceded caused him concern.

"Prison staff are a powerful enemy and I'm in this house," he said.

ICAC Commissioner Stephen Rushton said to Prisoner A if anything happened to him, the inquiry would want to hear about it.