Following the Peace of Amiens, Duff was given , something of a celebrity ship in the Royal Navy following her capture of the French "Hercule" in 1799 in which her captain Alexander Hood was killed. Rapidly moulding the ship with his own brand of Scottish discipline, Duff took her to join the fleet off Cadiz at the beginning of October and instantly became friends with Nelson, despite their vastly different characters. Such was Duff's reputation, that Nelson entrusted him with the command of the inshore squadron, which watched the harbour entrance for an enemy appearance. The job was dangerous due to the proximity of the shore, and unpleasant because ships stationed at this point were exposed to the enemy and the threat of failure if the enemy were able to escape. Duff handled the job excellently however, and on 21 October reported that the enemy had left Cadiz and were heading out to sea.