His trip to Botswana, which was widely criticised, emerged after he was flown home for treatment for a fractured hip.
"I'm very sorry, I made a mistake. It won't happen again," he said, as he left San Jose hospital in Madrid.
It was widely reported that he had been hunting elephants, which the royal house has neither confirmed nor denied.
By Tom BurridgeBBC News, Madrid
According to Spain's most-read newspaper, El Pais, this is the biggest crisis for Spain's monarchy since the country's dictatorship ended in 1975.
News about the king's hunting trip has caused outrage among many because of the type of animal he is thought to have been hunting: elephants.
But the real scandal is that the head of state was off on an expensive hunting expedition in Africa, during one of the most precarious moments in Spain's economic crisis, when more than five million Spaniards are out of work, and the country is facing deep public spending cuts and a significant rise in the cost of living.
It is in this context that the king made his first-ever public, and very clear-cut, apology.
It is what senior opposition politicians had called for, and so it seems the hunting holiday scandal will die down.
However, the King has another matter to worry about.
His son-in-law, Inaki Urdangarin is still being investigated on corruption allegations, which he strongly denies.
In the past, public criticism of the Spanish royal family was not "the done thing". Now it is something the Spanish papers are increasingly used to.
He broke his hip falling on a step and was flown home by private jet. He underwent hip replacement surgery on Saturday.
After news of his visit to Botswana was revealed, many Spanish newspapers published an earlier photo of the king on safari, in which he is seen standing with a gun beside a dead elephant.
The king, 74, is honorary president of the Spanish branch of conservation group WWF and an online petition calling for his resignation had accumulated almost 85,000 signatures by the time he made his public apology.
Spain is the fourth biggest economy in the eurozone but has seen its debt crisis worsen and its borrowing costs increase. It currently has a 23% unemployment rate and there are fears it could return to recession.
The BBC's Tom Burridge in Madrid said the king had faced a public outcry for going to Africa and quite probably hunting elephants when a lot of people were facing the harsh reality of an economic crisis.
Although the leaders of the ruling Popular Party and Socialists had declined to comment on the controversy, the Socialists' leader in Madrid Tomas Gomez suggested the king should choose between his "public responsibilities, or an abdication".
El Pais newspaper reported that the royal house had considered its response carefully and that the king had decided to speak publicly before the television cameras rather than leave the matter to a palace statement.
The king is generally popular in Spain but the royal family has recently been beset by a series of embarrassing news stories.
His son-in-law, Inaki Urdangarin, has been questioned about a corruption scandal that involves claims that he used public funds to organise sports events. He has been suspended from taking part in royal engagements.
Only last week, the king's grandson, 13-year-old Felipe Juan Froilan, was himself taken to hospital after an incident involving a gun. He shot himself in the foot during target practice outside the family home.
King Juan Carlos has apologised to the Spanish people for going on a hunting trip in Africa while his country was in the midst of an economic crisis.