He studied the humanities at the Jesuit College of St. Antão, where he showed a precocious talent, and tradition says that at the age of fourteen he composed a poem in ottava rima to celebrate the recovery of Bahia from the Dutch, while at seventeen he wrote a scientific work, Concordancias mathematicas.
[1] The death of his father, Dom Luiz de Mello, drove him early to soldiering, and having joined a contingent for the Flanders war, he found himself in the historic storm of January 1627, when the pick of the Portuguese fleet suffered shipwreck in the Bay of Biscay.
He spent much of the next ten years of his life in military routine work in the Iberian Peninsula, varied by visits to the court of Madrid, where he contracted a friendship with the Spanish poet Quevedo and earned the favor of the powerful minister Olivares.
In 1637 the latter despatched him in company with the conde de Linhares on a mission to pacify the revolted city of Évora, and on the same occasion the duke of Braganza, afterwards King John IV (for whom he acted as confidential agent at Madrid), employed him to satisfy Philip III of Portugal of his loyalty to the Philippine Dynasty.
In the last year he proceeded to Parma and Rome, by way of England, and France, and Afonso VI of Portugal charged him to negotiate with the Curia about the provision of bishops for Portuguese sees and to report on suitable marriages for the king and his brother.
He strove successfully to emancipate himself from foreign faults of style, and by virtue of his native genius, and his knowledge of the traditional poetry of the people, and the best Quinhentista models, he became Portugal's leading lyric poet and prose writer of the 17th century.