Álvares served as chamberlain and secretary of the Portuguese royal prince or "infante" the holy Ferdinand, the youngest of the 'Illustrious Generation' () – the children of King John I and Philippa of Lancaster). He accompanied Ferdinand on the ill-fated Portuguese campaign to conquer Tangier from Marinid Morocco in 1437. To preserve his army from destruction, Prince Henry the Navigator, commander of the expedition, signed a treaty that agreed to deliver Ceuta (captured by the Portuguese earlier in 1415) back to Morocco. Henry handed over his brother Ferdinand to the Marinids as a noble hostage to ensure the delivery of Ceuta. As a member of his household, Álvares accompanied Ferdinand into Moroccan captivity.