In 1754, Denis entered Parliament as member for Hedon, a Yorkshire borough where Anson was the "patron" with the power to select the MPs.
He held the seat for fourteen years, throughout which time the other MP was another naval officer, Sir Charles Saunders, who later rose to become First Lord of the Admiralty.
Denis continued his naval career, commanding the 90-gun HMS Namur in Admiral Edward Hawke's unsuccessful expedition against Rochefort in September 1757.
At the action of 29 April 1758, he was captain of the 70-gun HMS Dorsetshire which defeated and captured French ship of the line Raisonnable in the Bay of Biscay.
He was buried at St. George the Martyr Cemetery, Brunswick Square, beside his mother Martha (d.1746), his wife Elizabeth (d.1765), his brother Charles (d.1772), and his sisters Susanna (d.1776) and Ann (d.1793).