In the context of Spain's New World Empire, its mainland coastal possessions surrounding the Caribbean Sea and the Gulf of Mexico were referred to collectively as the Spanish Main. During the 16th and 17th centuries, the southern portion of these coastal possessions were known as the Province of Tierra Firme, or the "mainland province" (as contrasted with Spain's nearby insular colonies).
It included present-day Florida, the western shore of the Gulf of Mexico in Texas and Mexico, Central America and the north coast of South America. In particular, the term is most strongly associated with that stretch of the Caribbean coastline that runs from the ports of Porto Bello on the Isthmus of Darien in Panama, through Cartagena de Indias in New Granada, and Maracaibo to the Orinoco delta on the coast of Venezuela. Veracruz in New Spain was another major port.
From the 16th to the early 19th century, the Spanish Main was the point of departure for enormous wealth that was shipped back to Spain in the form of gold, silver, gems, spices, hardwoods, hides and other riches.
Silver in the form of pieces of eight were brought to the Spanish Main by llama and mule train from Potosí via the Pacific coast, while wares from the Far East that had arrived at Acapulco on the Manila galleons were also then transported overland to the Spanish Main.
From there, they were shipped to Spain by Spanish galleons. Because of the tremendous riches shipped from it, the Spanish Main was ripe territory for pirates and privateers.
The word main in the expression is short for mainland.