Few particulars of this ingenious poet and elegant gentleman have been transmitted by his cotemporaries to posterity.
William Hamilton was the second son of a gentleman of opulent fortune and honourable connections; and was born at Bangour, in Ayreshire, the family residence, in 1704. He received all the advantages of a liberal education; and being intended for no particular profession, his taste, like his studies, were unconfined; but a genius for poetry discovered itself at a very early age, and this he improved by classical learning, and an intimate knowledge of men and manners.
During the prime of his life he seems to have divided his time between the occupations of literature, the amusements of poetry, and the gaieties of polished society, in which he shone with peculiar lustre.
The latter part of his days was clouded with misfortune. Both education and attachments had formed him a Jacobite; and in an evil hour, he joined the standard of the Pretender in 1745.
He celebrated the success of his party at Preston Pans, in a beautiful Ode on the Battle of Gladsmuire; but this was the only occasion he found for triumph and exultation. Next year the Jacobites were crushed; and he was obliged to wander about in the Highlands, for some time, exposed to the greatest dangers and inconveniences, till at last he found means to escape to France.
Hamilton resided on the continent for several years, unconnected with party, and devoting his time to the ingenuous muse. At length, having made his peace with government, he returned to Scotland to take possession of the family estate, which had devolved to him by the death of his elder brother. His constitution having been always delicate, the severity of his native climate did not agree with him, and he returned to the continent, where he died at Lyons, in 1754. His corpse was brought to Scotland, and interred in the abbey church of Holyrood house
Hamilton had been twice married, and left an only son to inherit his estate. He seems to have possessed the social virtues in an eminent degree, and to have been highly respected among his friends. As a poet, The Triumph of Love, The Braes of Yarrow, and some of his adapted translations of Horace, bespeak the delicacy of his taste, and the force of his genius.