The deceased were identified as under-trial Pawan Kumar (35), two elderly prisoners Mullaram (71) and Cornel Singh (84), the DG (Jail) Omendra Bhardwaj said.
Constable Tarsen Singh who tried to intervene and stop the accused received injuries on his head and hand, while another monitor for prisoners Chajju Ram also received wounds on his hand, Bhardwaj said.
35-year-old accused inmate Habib, who is serving a life term and is mentally ill, allegedly hit Mullaram with a brick first, and went on to hit four others with the same brick at around 9 AM, he said.
The injured inmates were rushed to the hospital where they succumbed to their injuries, Bhardwaj said, adding that the two injured were given treatment at a hospital here.
About two months back Habib was taken to a government hospital in Jaipur for mental treatment and brought back to the Bikaner cell, the DG(J) said.
"Habib said Pawan used to laugh at him and make sarcastic remarks against him which instigated him to take such an abrupt step", Bhardwaj added.
ADG-Jail Sunil Mehrotra will conduct the enquiry, Bhardwaj said, adding that a judicial probe will be held by the district judge.
Security inside the jail has been strengthened as a precautionary measure, he added.