Mayabeque was created on August 1, 2010 when the National Assembly of Cuban People's Power agreed to modify the political-administrative division, approving the creation of the Mayabeque and Artemisa provinces based on the segmentation of the old Havana province. The first founding site of Villa San Cristóbal de La Habana was found in the territory in 1514, later transferred to the north coast to the port of Carenas. Although there is a discrepancy among historians regarding the exact location, it is believed that one of the most probable sites is the center of the old Hato de San Pedro de Mayabeque, currently bordering between the Melena del Sur and Güines municipalities.
From this southern point the Hernán Cortes expedition left for the conquest of Mexico. Despite the transfer of the town to the north coast, the original settlement of Spaniards and mestizos in haciendas and settlements remained in part in this region. The first population established in the territory, which lasts until today, is Batabanó which served as the southern port of the town for cabotage navigation to the southern and eastern towns of the country.