On 19 February 1816 Maitland was given command of the large frigate HMS "Glasgow", in which he joined the fleet of Rear-Admiral Sir Edward Pellew on 20 July off Portsmouth, for service against Algiers. On 27 August the fleet began the Bombardment of Algiers, with "Glasgow" between the frigate HMS "Severn" and the Dutch frigate "Melampus" firing at the gun batteries of the town. When the ship-of-the-line HMS "Impregnable" signalled to the fleet that she had suffered one hundred and fifty casualties, Maitland volunteered to divert enemy fire from her. While "Glasgow" left her position in the line and attempted to close with "Impregnable", the winds made movement very difficult and after an hour "Glasgow" had failed to move far from "Severn", and was left open to fire from the Algiers fish markets that she had before been hidden from. "Glasgow" was heavily damaged during the engagement, having ten men killed and thirty-seven more wounded. Maitland was made a Companion of the Order of the Bath on 19 September for his service at the bombardment. He paid off "Glasgow" in November of the same year in order that she be repaired from her Algiers services, and recommissioned her again on 21 August 1817 for service in the Mediterranean Sea, where he served until March 1821 when he sailed "Glasgow" home and went on half-pay. On 26 February 1820 he was made a Knight Commander of the Order of St Michael and St George. In August 1830 he was appointed as a naval aide-de-camp to King William IV and continued as such under Queen Victoria until his promotion to flag rank.