Later in his career, Williams commanded squadrons blockading the European coast and assisting the supply of the British Army during the Peninsula War.
He is reported to have followed his father through various commands (although many of these commissions were on paper only) until 1776, when he was certainly present at the Battle of Sullivan's Island, aboard the brig HMS Active.
Having gained the requisite seniority, Williams was promoted to lieutenant in December 1779 and served on HMS America, part of the fleet that captured a Spanish convoy from Caracas in 1780.
During the winter of 1796, Unicorn formed part the squadron operating against the French Expédition d'Irlande and was present at the capture of the transport Ville de Lorient.
[1] In March 1797, Williams became commander of the new frigate HMS Endymion and in October joined the North Sea fleet with orders to pursue the scattered Dutch ships in the aftermath of the Battle of Camperdown.
During his retirement, Williams lived at Burwood House near Weybridge, Surrey and was promoted to admiral and advanced to a Knight Grand Cross of the Order of the Bath.