Born in Peru, Tristán y Moscoso went to Spain, where he fought the French in the War of the Convention (1793–1795). On his return to Peru he was elected "alcalde" (mayor) of Arequipa (1808). He was a general in the Royalist army in Peru. In June 1811 he fought as part of the victorious Royalist forces in the Battle of Guaqui.