Juan Cortina was born in Camargo, Tamaulipas, the son of Trinidad Cortina and Estéfana Goseacochea, a wealthy cattle-ranching family. At the time of his birth, his family's Espiritu Santo land grant encompassed more than 260,000 acres. When he was three, his family relocated to the Rio Grande Valley, as his mother had inherited vast tracts of Espiritu Santo in the area surrounding Matamoros and Brownsville. In 1846, at age 22, he enlisted with a Mexican Army unit commanded Gen. Mariano Arista, who had arrived at Matamoros in an attempt to stop the advancing forces of Gen. Zachary Taylor. Arista asked Cortina to form a force from the local "vaqueros" (Mexican "cowboys") who worked for him and the nearby ranches. This irregular cavalry regiment (called the "Tamaulipas") was placed under his command, and as the Mexican–American War began, it participated in the battles of Palo Alto and Resaca de la Palma.