In 1805, Valdés and the "Neptuno" were based in Cadiz as commodore of a squadron of ships, and so they were called on to fight when the French fleet attempted to make the open sea during the Trafalgar Campaign. On the 21 October the combined fleet was chased down and attacked in the Battle of Trafalgar. Valdés fought hard, his ship was leading the combined fleet and turned back into the melee behind him. Unfortunately the French ships accompanying the "Neptuno" under Admiral Dumanior did not turn back and so the isolated "Neptuno" was surrounded and suffered great damage. Valdés himself was seriously wounded and eventually lost consciousness. The disabled "Neptuno" was eventually forced to surrender.