Born in Ferrol, Galicia, Montojo studied at the Naval School in Cadiz, and was assigned as a Midshipman in 1855.
Montojo fought in the Battle of Abtao and the Battle of El Callao under Admiral Casto Méndez Núñez against Peru and subsequently assumed a post at the Secretariat of the Admiralty.