Firefighters were called to an incident at the Queen Alexandra Hospital.
The fire is believed to have started in the laundry chute at an accommodation block.
A spokesperson for Hampshire Fire and Rescue Service said the fire had been brought under control by the time they arrived.
Crews were called at 3.15am. The fire was limited to the chute.