The left-handed opener, 36, who played six Tests for England, last appeared for his county in July 2016 before he was diagnosed with a cancerous tumour.
He immediately started treatment and had a successful operation.
Carberry scored exactly 100 off 121 balls in Hampshire's game against Cardiff MCCU at the Ageas Bowl.
Having resumed pre-season training in January and going on a tour of Barbados with the county, Carberry released a statement on Tuesday thanking people for their support and urging the media to continue "respecting my privacy in dealing with my illness".
Hampshire begin their County Championship Division One season against Yorkshire at Headingley on Friday.

Rafa told the BBC's Today programme: "They used us and threw us away."
The Brazilian, 24, who admits using false documents to get the job, said he had been called to a meeting on 4 July, where immigration staff arrested him.
Byron said it had been unaware workers had used fake papers until it was informed by the Home Office.
People from Brazil, Albania, Nepal and Egypt were arrested following raids at Byron restaurants across London.
The Home Office said that of the 35 people who were interviewed by immigration officials, 25 have since been deported.
Rafa said he came to the UK in May 2015 to "try his luck" at getting work, and used a false National Insurance card and a fake Italian identity card to get a job at Byron.
On the morning of the raids, he said he was told to attend a meeting at the restaurant where he worked.
The woman conducting the meeting looked "nervous" and "strange", he said, adding that immigration officers arrived 10 minutes later. He was then interviewed and deported that night.
Rafa said he knew what he had been doing was wrong - but said the way he was arrested "is what bothers me".
"I felt very bad, because we didn't expect it. I could be caught at any moment - in the street, or in one of the operations by the immigration office.
"But the way it was done was what bothered us, what made us sad."
He added: "We had been using fake documents, but we paid our taxes normally. That's what made us the saddest - they used us and threw us away."
Rafa said the immigration officials treated him well, giving him the opportunity to go home and collect his belongings. He knew the risks he faced and that "if something happens you can be arrested or deported".
But he added: "That's not the point. The question is, how they did it," adding that he hopes to return to the UK in future and will apply for a visa.
In a statement, Byron said it was completely unaware that any of its workers were in possession of false documentation until the Home Office raids.
The restaurant chain, which has 65 outlets across the UK and more than 1,500 employees, said it carried out rigorous right-to-work checks, but the false documentation was "sophisticated."
The Home Office said the operation was carried out with the full co-operation of the business, who had carried out the correct checks on staff members.
As a result, the chain would not face any legal action itself, the Home Office confirmed.

The German shepherd, which belonged to Cleveland Police, was being exercised near to Ormseby Stables in Eston when it bit a 28-year-old man.
The man suffered puncture wounds on his arm and upper body and was taken to hospital. The dog handler also suffered an injury to his arm.
The force has apologised and referred itself to the Independent Police Complaints Commission.
A police spokesman said: "Based on an assessment of the animal it has been put to sleep.
"This was not an easy decision for any of the people involved, but has been made in the best interests of all those involved."
The incident occurred on 6 June.
Temporary Assistant Chief Constable Ciaron Irvine said it would be "wrong to speculate" until the full circumstances were known.
"What is clear is that this incident should not have happened and we must absolutely understand what went wrong," he added.
Michael Carberry scored a century in his first competitive outing for Hampshire since returning to cricket after undergoing treatment for cancer.
[NEXT_CONCEPT]
A former worker at the Byron hamburger chain, who was arrested and deported after immigration raids last month, says he feels "used".
[NEXT_CONCEPT]
A police dog has been put down after biting a member of the public.