Medvedev and Castro discussed further ties between the two Cold War allies and international politics at the meeting that lasted more than an hour, the Russian president's press secretary, Natalia Timakova, said.
Castro, 82, stepped down early this year in favor of his brother, Raul, after ruling the country for almost 50 years. He had long been out of the public eye after undergoing surgery in July 2006. However, he continues to meet with foreign leaders, in early November, Castro met with Chinese leader Hu Jintao.
Medvedev arrived in Cuba from Venezuela, where an arms deal and an agreement on cooperation in oil production were signed, and plans to jointly build a nuclear power plant in the Latin American state discussed.
Medvedev and his Venezuelan counterpart, outspoken U.S. critic Hugo Chavez, visited one of two Russian warships that arrived in the Caribbean for joint exercises for the first time since the Cold War.
The tour came amid tensions between Moscow and Washington over U.S. missile defense plans for Central Europe and Russia's armed conflict with Georgia in August.
Summing up the results of his tour, which also included visits to Peru and Brazil, Medvedev said in Havana: "Russia has already returned to Latin America, including Cuba." He added Russia's efforts to step up ties with regional states were not aimed against third countries.