His father was a sea merchant who was one of the largest provisioners of General George Washington's army during the American Revolution.
On May 26, 1778, Fanning embarked from Boston, Massachusetts, aboard the brig Angelica as a prizemaster under the command of Captain William Denison in a cruise against the British.
By orders of General Howe, the Americans were confined to the hold and treated severely, being allowed but a half-pint of water per day per man, even though the heat was so unbearable that the men were obliged to strip off all their clothes.
While Eclipse was being refitted, Fanning made two trips to London, once as a spy and once to deliver peace proposals from the court of French King Louis XVI.
To escape Jupiter, Fanning ordered Eclipse to pass directly through the middle of the British Channel Fleet in broad daylight.
Returning to Dunkirk, Fanning set sail again on November 14, but was captured a fourth time by the British frigate Belle Poule.
Learning that a peace treaty was imminent, Fanning attempted to launch yet another expedition against the British, but was unable to set sail before further privateering was prohibited.
While stationed in Charleston, South Carolina, Lieutenant Fanning died of yellow fever on September 30, 1805, while commanding Gunboat Number 1.