His most notable service was as Admiral Adam Duncan's flag captain on board HMS Venerable during the Battle of Camperdown on 11 October 1797.
William was born in Bagshot, the eldest son of Joseph Fairfax of the Horse Guards and Mary Anne.
He was commissioned a lieutenant on 20 December 1757, and later served on HMS Eurus off North America.
In 1782 Fairfax was released as a post captain and briefly commanded HMS Tartar.
His fourth son Henry Fairfax was made a baronet in 1836 in recognition of his father's service.