Firefighters were called to Wakefield prison after a fire broke out in one of the cells.
West Yorkshire Fire and Rescue said the fire had started in a cell on the fourth floor shortly before 2100 BST on Thursday.
Crews used breathing apparatus and a ventilation fan to extinguish the fire.
The prisoner had been removed from his cell before the fire crew's arrival. He was taken to hospital but has since been returned to the prison.