The agreement deals with Cuba's mid and long-term debt with Britain, according to a Cuban government statement.
The agreement "should contribute to the development of economic, commercial and financial relations between the two nations," the statement reads.
At the meeting, Castro and Hammond "verified the advances" in bilateral relations and "the potentials" in areas of mutual interest.
Neither the British embassy in Havana nor Cuban officials gave a figure for the debt, nor any further details on the agreement.
More From This Section
In exchange, the Paris Club is writing off the interest accumulated of USD 8.5 billion.
Hammond is the first British foreign secretary to visit Cuba since the 1959 revolution.
The visit also follows meetings in recent months between Castro and other top officials and leaders from the European Union.
Castro met with French President Francois Hollande on a visit to Paris in February.
In March, European Union foreign policy chief Federica Mogherini became the highest-ranking EU official ever to visit Cuba when she travelled to Havana.
Cuba's leaders have rejected criticism of their human rights record by the United States and Europe, warning that they will not tolerate meddling in their country's internal affairs.
Britain was the second-biggest source of foreign tourists to Cuba last year after Canada, with 160,000 Britons making the trip.
Hammond's visit comes one month after US President Barack Obama's historic visit to the Caribbean nation, which is opening up to warmer ties with its old Cold War rivals.
Although Havana and Washington restored diplomatic ties last year, the US trade embargo on Cuba dating to the 1960s remains in place.