Late career
In 1573, John of Austria summoned Giovanni and his brother Pagano to take part in the capture Tunis, an operation carried out easily. Upon their return, the political situation in Genoa had once again become complicated. The new nobility was gaining power at the expense of old, pro-Spanish families like theirs, to the point that Doria contacted Don John to plan a military intervention in the Republic should the situation become desperate. Pagano, a captain in the tercio infantry, had remained with the garrison in Tunis and fell in battle when the Turks recaptured the stronghold the following year; Don John and Giovanni were unable to come to their aid due to logistical difficulties and bad weather.
By 1575, growing factionalism in Genoa had reached such a pitch that a civil war with the pro-French elements was foreseeable. Giovanni and Don John of Austria had each prepared a fleet to intervene in Genoa, coordinating with Antonio to block the shipment of supplies from Naples as a means of exerting pressure, and troops were even deployed to contain the insurgent faction. However, a negotiated solution was found to the Republic's problems, and it remained within the Spanish political spere. Doria played a pivotal role in this political achievement by winning over the city's guilds, discrediting the coup plotters, and reaffirming the principle of equality among the various noble factions that had prevailed since the reforms of his uncle Andrea.
This coincided with a marked rise in his standing at the imperial court. His ships aided the fight against Barbary corsairs and facilitated the transport of troops and funds to the armies fighting in the Dutch Revolt, a campaign then led by John of Austria himself, in close correspondence with Doria. However, his military role had diminished, as warfare in the Mediterranean had diminished following the victory at Lepanto, and his galleys were ill-suited to navigate the Atlantic, where new wars were raging. In 1582, he sold nearly all his galleys to Spain and, with the backing of Cardinal Granvelle, got to be appointed Captain General of the Sea, the very post once held by John of Austria and other high-ranking commanders. Ironically, this shift led to friction with the citizens of Genoa, who accused him of arrogance and authoritarianism in his new role, although his local power remained unrivaled, even controlling the election of the doges.
In 1586, he acted as a diplomat with England, where the Genoese renegade Orazio Pallavicino attempted to negotiate an end to the Anglo-Spanish War with him. Doria replied that there could be no peace as long as Francis Drake's raids continued. By 1594, however, his health was no longer sufficient for the demands of his command, and he requested to step down. Although his resignation was not granted, he was compensated with a seat on the Council of State and the rank of knight commander in the Order of Santiago. At that time, Doria was at the pinnacle of his wealth and international political influence.
Upon the king's death, Doria continued his role at the court of Philip III, although he requested retirement due to his further declining health, only to be denied again. In 1600, he helped expel the pro-French Goffredo Lomellini from Genoa, and the following year, under the auspices of the Duke of Lerma, he organized an attempt to conquer Algiers, a center of Barbary piracy. Although he set sail with a force of 70 galleys and 10,000 men, he was forced to abort the plan just outside the city after a massive storm compelled the fleet to return to port. Weary after this fiasco, he again asked to be relieved of his post as Captain General, and this time his request was granted. In the ensuing years, he engaged in political intervention in Monaco on Spain's behalf.