The 41.5-metre (136-foot) yacht Fortuna was donated to the monarch in 2000 by a business group in the Balearic Islands which hoped the royals presence in the Mediterranean archipelago would draw holidaymakers.
But in May 2013 the royal household announced that the king was giving up the yacht which reportedly cost 21 million euros in what was seen as a cost-cutting move when Spain was in the grip of a severe economic downturn that has left one in four people out of work.
Each refuelling of the yacht costs more than 20,000 euros, according to the Spanish press.
The business group, the Tourism and Cultural Foundation of the Balearic Islands, then sent a letter to the National Heritage department which manages state assets used by the royals to ask that it return the yacht.
"After analysing different offers received over the last six months, it was unanimously decided to accept the offer of Balearia Eurolineas Maritimas for the amount of 2.2 million euros," the group said in a statement.
Balearia, based in the Mediterranean port of Denia, operates cargo and passenger transport in northern and southern Spain, including a ferry service between Algeciras and Tangiers in northern Morocco.
"Fondatur has accepted the offer. It just has to formalise the operation," a Balearia spokeswoman told AFP.
Juan Carlos, 76, is credited with helping guide Spain to democracy after the death of the dictator Francisco Franco in 1975, but his popularity was damaged by scandals in the twilight years of his nearly 39-year reign.
His youngest daughter, Princess Cristina, 49, has been named a tax crime suspect in a judicial investigation into her husband Inaki Urdangarin's allegedly corrupt business dealings.
Juan Carlos, who abdicated in favour of his son Felipe on June 18, also provoked outrage among Spaniards when in April 2012 he took a luxury elephant-hunting safari in Botswana in the midst of the economic crisis.
The holiday was only discovered when the king broke his hip and had to return to Spain for treatment, leading him to issue an unprecedented apology.