Son of William IV of Nassau and Anne (d. 1759), Princess Royal of Great Britain, Ireland, and Hanover.
William inherited the title of Stadtholder of the Dutch Republic from his father at the age of 3 but didn't assume the office until his 18th birthday in 1766. In 1776, despite William's wishes, Holland was the first foreign country to officially recognize the United States of America, a decision eventually leading to a disastrous war with England. In the mid-1780s, William was forced to remove his court to Gelderland, far from the political centre at The Hague, due to popular unrest. In 1787 the rebels were crushed by an army sent by his relative, Frederick William II of Prussia. In 1793, however, Holland declared war on France. The war resulted in a total Dutch defeat, and William had to flee the country. He died in 1806 in Brunswick, Germany.
Boswell was introduced to the young prince on January 5, 1764, by the British ambassador to The Hague, Sir Joseph Yorke.