James Hackman (baptized 13 December 1752, hanged 19 April 1779), briefly Rector of Wiveton in Norfolk, was the murderer who killed Martha Ray, singer and mistress of John Montagu, 4th Earl of Sandwich.
Baptized on 13 December 1752 at Gosport, Hampshire, Hackman was the son of William and Mary Hackman. His father had served in the Royal Navy as a lieutenant. Hackman was apprenticed to a mercer, and although according to some accounts he became a member of St John's College, Cambridge, no record of this can be traced at Cambridge.
In 1772, Hackman was purchased a commission as an ensign in the 68th Regiment of Foot, and in 1776 was promoted lieutenant, but by early 1777 he had resigned from the army to become a clergyman. On 24 February 1779, Hackman was ordained a deacon of the Church of England and on 28 February a priest, and on 1 March 1779 was instituted as Rector of Wiveton, a place which he may never have visited.
In about 1775, while he was a serving army officer, Hackman visited Lord Sandwich's house at Hinchingbrooke and met his host's mistress Martha Ray. She was "a lady of an elegant person, great sweetness of manners, and of a remarkable judgement and execution in vocal and instrumental music" who had lived with Lord Sandwich as his wife since the age of seventeen and had given birth to nine of his children. Sandwich also had a wife, from whom he was separated, who was considered mad and who lived in an apartment at Windsor Castle. This was the same Lord Sandwich who is said to have called for a piece of beef between two pieces of bread, thus originating the word sandwich. He was a patron of the explorer Captain James Cook, who named the Sandwich Islands after him.