Returning fresh from this triumph, he was appointed to the command of the 74-gun HMS Hannibal, and sent out with a fleet under Rear-Admiral Sir James Saumarez to patrol French and Spanish ports.
This action, the First Battle of Algeciras, was hard-fought, and the British were hampered by shallow waters, light breezes and the presence of enemy shore batteries.
He went out to the West Indies as senior officer at Port Royal, but was struck with a sudden illness and died aboard his command.
He appears in Patrick O'Brian's nautical historical novel Master and Commander, where he is described as a former shipmate of the fictional character Jack Aubrey.
[5] He took part in the capture of Gorée from the French in April 1801, while cruising with a squadron under the command of Captain Sir Charles Hamilton.
[6][7] Ferris then took over command of the 74-gun HMS Hannibal and sailed to join the fleet assembling for the Mediterranean under Rear-Admiral Sir James Saumarez.
While off Cádiz, news reached Saumarez that a French squadron under Charles-Alexandre Léon Durand Linois had arrived in the area, and was making for Algeciras.
[9] At 10:12 he received orders to move inshore and attack Linois's flagship, the 80-gun Formidable, Saumarez detailing him to "go and rake the French admiral".
[12] The British force had suffered considerable damage to sails, masts and rigging, and in the light breeze, Saumarez saw there was the danger that the remainder of his ships might run aground like the Hannibal.
[13] Ferris ordered the survivors of his crew below decks to escape the worst of the fire as the combined guns of the French and Spanish forces turned on the last remaining target.
[14] French and Spanish soldiers then stormed the ship, and Hannibal's surgeon later reported that a number of wounded men were trampled to death as the boarding parties sought to extinguish the fires.
[16] Captain George Heneage Lawrence Dundas, who had watched the entire battle from Gibraltar, believed on seeing the flag that it meant that Ferris was still holding out on Hannibal and requesting either support to salvage his battered ship or for her to be evacuated before surrendering.
[18][c] After hearing the evidence, the court ruled that Ferris was making the gallant and well-judged attempt to place her [Hannibal] so as to rake the enemy; and, after a considerable part of the ship's company had been killed or wounded, being obliged to strike His Majesty's colours; and that the conduct of Captain Ferris, in going into the action was that of an excellent and expert seaman, and that his conduct after she was engaged, was that of a brave, cool, and determined Officer; and that the said Captain Ferris, his Officers, and ship's company, by their conduct throughout the action, more particularly for continuing it for a considerable time after she was on shore, and the rest of His Majesty's fleet had been obliged to quit her, did the utmost for the preservation of his Majesty's ship and the honour the British flag; and doth adjudge them to be honourably acquitted, and the said Captain Solomon Ferris, his Officers, and ship's company are hereby honourably acquitted accordingly.
[19] The president of the court, Rear-Admiral John Holloway, returned Ferris's sword to him with the observation that "if ever you have occasion to unsheathe it again, it will be used with the same gallantry which you so nobly displayed in defending his Majesty's ship Hannibal.
Ferris also appears as a minor character in the first of the Aubrey–Maturin series of nautical historical novels by Patrick O'Brian, Master and Commander.
^ Also exchanged on parole at this time was Lord Cochrane, who had been captured by Linois's squadron in the Mediterranean while commanding HMS Speedy.