Command
Hastings was promoted to commander on 30 June 1838, and was appointed to the Coastguard
in January 1839. He was appointed to the 16-gun brig-sloop HMS Harlequin in August 1841 and sent to the China Station in time to take part in the last actions of the First Opium War then being fought. He remained in eastern waters after the end of the war, countering pirate operations on the coast of Sumatra. He was involved in the attack by the boats from Harlequin on the pirate enclaves of Quallah Batto and 'Murdoo', and his good service in these operations led to his promotion to captain, which came when he paid off the Harlequin on 31 January 1845.
Hastings was appointed to his next command, the steam paddle frigate HMS Cyclops, in September 1848. He commanded her on the west coast of Africa until February 1851. The crew of Cyclops are recorded as receiving bounties for the capture of the vessels Bom Successo on 25 December 1848, Esperanca on 10 May 1849, Sophia on 11 August 1849 and Apollo on 29 October 1949 (the last two in consort with HMS Rattler) Pilot on 10 January 1850, Ventura on 27 January 1850 (both with HMS Pluto), Sociedade on 17 June 1850, and an unnamed "slave brigantine" on 20 November 1850; as the chief duty of the West Africa Squadron was the suppression of the slave trade, presumably those ship were all slave ships. Hastings received £67 15 shillings and 11½ pence as his share from the Bom Successo, £398 18 shillings for Esperanca, £91 4 shillings 5¼ pence for Sophia and £106 19 shillings 10 pence for Apollo, £128 6 shillings 10 pence for Pilot, £250 11 shillings 11 pence for Ventura, £85 16 shillings 10 pence for Sociedade, and £333 2 shillings 10 pence for the unnamed brigantine; a total of nearly £1500, worth around £180,000 today.
An appointment to the steam frigate HMS Curacoa followed, and Hastings served aboard her for operations in the Mediterranean and Black Sea during the Crimean War.^ While serving in the Crimea Hastings distinguished himself at the Battle of Eupatoria in February 1855, and was Mentioned in Despatches in the London Gazette of 8 March 1855, and honourably mentioned by Omar Pasha. He was duly appointed Companion of the Order of the Bath (CB) on 2 January 1857, and was also awarded the third class of the Medjidie, an award he was authorised to accept on 3 April 1858.
He remained aboard Curacoa until May 1857. He briefly commanded HMS Maeander at Weymouth (a guardship for the coast guard service) before being appointed (November 1857) commander of HMS Blenheim the Portsmouth guardship. He became superintendent of Haslar Hospital and the Royal Clarence victualling yard in January 1858, holding the post until his promotion to rear-admiral on 27 April 1863. His next assignment was in November 1866, when he became commander-in-chief in the Pacific, with the broadside ironclad HMS Zealous as his flagship. He received another promotion on 10 September 1869 when he was raised to vice-admiral, and returned to Britain in November that year. His final position came with his appointment to be Commander-in-Chief, The Nore in February 1873. He retained the post for the usual three years, stepping down on 14 February 1876. He died shortly afterwards, on 21 March 1876 at his home at 41 Stanhope Gardens, South Kensington, London.