He was the son of Nathaniel Ogle of Kirkley Hall, Northumberland. As a naval officer he was commissioned a lieutenant on 19 November 1745 and then promoted to captain on 30 June 1756. He served as captain of and then during the Seven Years' War. He took a number of valuable prizes during his cruises, and received a knighthood in 1768. From 1770 he commanded the 74-gun during the Falklands Crisis, and then the 74-gun from 1774. He served under Admiral Sir George Rodney at the relief of Gibraltar in January 1780, the action of 8 January 1780 and the Battle of Cape St. Vincent. He was promoted to Rear-Admiral of the Blue on 26 September 1780, Vice-Admiral of the Blue on 24 September 1787, Vice-Admiral of the Red on 1 February 1793, Admiral of the Blue on 12 April 1794 and Admiral of the Red in 1805.