The judge's competence did not go unnoticed by the Royal Court and the King, Peter II, sent him a summons in January 1691 to leave magistrature and to become a special diplomat in the Dutch Republic, in order to settle the matter of the constant attacks of the Dutch navy against Portuguese ships.
The ship foundered, and the two boats spent the night adrift until morning, when their occupants spotted the English coastline.
Diogo de Mendonça Corte-Real proved to be efficient in dealing with the difficulties that arose between Portugal and the Dutch Republic.
After a series of conferences about the matter, on 22 May 1692, the diplomat achieved the goal of his mission when the two nations signed a treaty in which the Dutch Republic paid eighty-thousand patacas as compensation for all the attacks on Portuguese ships.
On 2 April 1701, King Peter II named him Secretário Real das Mercês e do Expediente having, as duties, passing decrees, orders, letters, and papers that were not of State-level importance and, more specifically, the ordering of mercês (mercies, roughly translated; the repayment for services to the State and Crown).