The Sorrento was travelling to the coastal city of Valencia when the blaze began and quickly got out of control.
The passengers were evacuated from the burning ship on to lifeboats and have been rescued by another ship.
At least three people have been injured and have been taken to hospital by helicopter, Spanish media say. One is reported to be seriously hurt.
The ship was about 27km (17 miles) from Mallorca when the fire broke out on Tuesday afternoon on one of the car decks. The reason for the fire was unclear.
Several ships including two passenger ferries were sent to help. The passengers and crew on the life rafts eventually boarded one of the ferries, the Puglia.
Spanish officials said the rescued passengers were on their way back to Palma de Mallorca and were expected to arrive at the port in a few hours' time. Psychologists were being asked to go to the port to provide counselling.
"Due to the fire that it has suffered, The Sorrento may sink in the position in which it finds itself," the Balearic Islands port authority said in a tweet (in Spanish).
The ferry, owned by Italian company Atlantica di Navigazione, sent out distress signals at 13:50 local time (11:50 GMT), said Spain's Ministry of Public Works.
At first, the ministry said the captain did not believe it would be necessary to abandon the ship but the fire became so intense that a full evacuation was called for.
A fire has broken out on a Spanish ferry from Mallorca, forcing some 150 passengers and crew to abandon ship.