He was educated at Winchester College and St John's College, Cambridge.
Sir William Stuart (born 31 October 1798-died 7 July 1874) married firstly Henrietta Mariah Sarah, daughter of Admiral Sir Charles Pole, 1st Baronet, and married secondly Georgiana, daughter of General Frederick Nathaniel Walker.