Died 1784. The son of the Reverend Barry Hartwell of County Cork, and of his wife, Mary Spierin, he was the father of Captain Sir Francis John Hartwell.
Hartwell was commissioned lieutenant on 12 June 1741 and spent some time in 1746 aboard the Gloucester 50, Captain Charles Saunders, sharing in the spoils of her capture of a Spanish register ship.
He was promoted commander on 13 May 1757 and had the sloop Cruizer 8 in the Downs through to the end of the year before joining the Porcupine 16. During the autumn of 1758 he commanded the Lizard 28 on a temporary basis off Brest under the orders of Captain Hugh Palliser of the Shrewsbury 74. In the company of that vessel and the Unicorn 28, Captain Thomas Graves, he distinguished himself on 12 September by placing his frigate between part of a convoy and its escort, consisting of two French frigates. This manoeuvre allowed one of the frigates, the Calypso, to be driven ashore and destroyed in Audierne Bay, whilst many of the coasters were snapped up by the squadron. Shortly afterwards, on 2 October, he captured the privateer Duc d Hanovre 14.
On 18 October 1758 Hartwell was posted captain of the Neptune 90, flying the flag of Rear-Admiral Sir Charles Saunders, and after going out to North America in February 1759 he served at the capture of Quebec. Returning to Europe he flew Saunders flag aboard the Neptune in the Mediterranean until she was paid off in 1762, barring a short time during 1760 when they were aboard the Thunderer 74. He then commanded the Blenheim 90 under Saunders, which vessel was brought out to the Mediterranean by Captain James Cranston in May 1762.
After the peace of 1763 Hartwell was appointed in the autumn of that year to the Plymouth guardship Belleisle 64, remaining with her for the usual three years. During the Falkland Islands dispute of 1770 he commissioned the new Trident 64 in October but left her shortly afterwards. 1774 saw him appointed to the Boyne 70, serving in North American waters from the autumn, and joining Vice-Admiral Samuel Graves in his largely unsuccessful attack upon the rebel privateer base of Falmouth on 17 October 1775. He returned home in March 1776 carrying Major-General John Burgoyne as a passenger.
Hartwell next rejoined the Blenheim 90, recommissioning her in March 1777 and being present in the Channel Fleet retreat of August 1779. He accepted a less onerous position aboard the Plymouth guardship Cambridge 80 in the early part of the following year, and remained with her through to 1781 as flag-captain to Vice-Admiral Lord Shuldham, whose flag he had briefly flown aboard the Blenheim. After leaving this vessel he accepted the position of lieutenant-governor of Greenwich Hospital.
He died in January 1784.
Hartwell married Rebecca Collins of Plymouth, Devon, and had issue three sons and a daughter. His third and youngest son was Captain Francis John Hartwell.