 Maxwell commanded Daedalus for less than a year. On 2 July 1813 the frigate ran aground on a shoal off Galle, Ceylon, causing serious damage to her keel. Although she was soon brought off, the leaks created in the grounding became so severe that Maxwell had no option but to order his crew to cease their desperate attempts to keep her afloat and abandon ship. He was the last to leave and shortly after he had been transported to a nearby East Indiaman, Daedalus rolled over and sank. Maxwell returned to Britain to face a court martial but was exonerated for the frigate's loss and reappointed to Alceste. In 1815 he was made a Companion of the Order of the Bath for his naval service, and although the war against France had ended, was retained for active duty at the special request of Lord Amherst.
