1736-1817. He was the youngest of five sons and nine children of John Edgar, the Laird of Wedderlie, Berwickshire, Scotland, and of his wife Mary Home.
Edgar was commissioned lieutenant on 20 December 1757 and in the following year served aboard the fireship Vesuvius, Commander James Chads, going out to North America where he saw action in the campaign to capture Quebec.
In 1764 he sailed for the West Indies aboard the Africa 64, Captain Hon. John Leveson-Gower, coming home to be paid off in the following year. He saw further service under Leveson-Gower aboard the Aeolus 32, going out to the Mediterranean in 1766, and from 1769 he was aboard the Dorsetshire 68, Captains Robert Lambert and Michael Clements. He next joined the Plymouth guardship Ocean 90, Captain Joseph Knight, in 1771.
After a period of unemployment Edgar was appointed at the end of 1776 to the Princess Amelia 80, Captain Digby Dent, and he was promoted commander on 27 August 1778. At the end of the year he was appointed to the fireship Vulcan which sailed for North America in the spring of 1779, and during 1780 he had the fireship Strombolo at New York. Having been posted captain on 30 November 1780 he came home in March 1781 with news of the loss of the Culloden 74 off Sandy Hook.
During 1781 briefly commanded the Ocean 98 in home waters, and he then had the Medway 60 from 1782 until the peace of 1783, bringing an East India convoy into Plymouth from St. Helena during October 1782.
From April 1783 until paid off in November 1785 Edgar commanded the Leocadia 36 on the Newfoundland station, and during the Dutch Armament in 1787 he commissioned the Prince George 98 for the flag of Rear-Admiral William Hotham at Chatham. In May 1790 he commissioned the Illustrious 74 for the flag of Rear-Admiral Hon. John Leveson-Gower for possible service in the Spanish Armament.
He did not see any further service but became a superannuated admiral on 20 February 1799.
Edgar died on 17 February 1817 in Bedford Street, Bedford Square, London.
On 18 January 1783 he married Sophia Margaret Johnstone who died after a long illness in Great Yarmouth, Norfolk, in January 1807, and with whom he had issue a daughter, Sophia, who married Captain Robert Campbell in 1804. His address in his will was given as Great Yarmouth.