johnston was born in boston, massachusetts, one of the four sons of the japanner thomas johnston and his wife, rachel thwing. his brother john became a painter as well. john smibert and peter pelham were among the family's neighbors, and william was a friend of john singleton copley, who was six years his junior; he likely also knew the latter's half-brother, henry pelham. he began his career as a musician, serving as organist at boston's christ church from 1750 to 1753, before he decided to become a painter. this career, too, he began in boston, but for many years no works from his early career were known until a pair of portraits in the metropolitan museum of art were identified as his. he traveled next to portsmouth, new hampshire for work, living there from 1759 until 1762. next he moved to connecticut, remaining in the colony for at least three years; during his sojourn there he worked in new london, new haven, and the area around hartford. he was the first painter to work there – residents previously having to travel to boston, newport, or new york city to be painted – and may have been lured there by his sister, susan hobby, who lived in middletown. he counted a number of members of the most prominent families in connecticut, including the mumfords, among his patrons.