Little is known of the history of William Hamilton of Bangour, except the meagre facts that he lived, and loved, and wrote, and died. He was the second son of John Hamilton, of Bangour, and grandson of James Hamilton, a descendant of the Hamiltons of Brentwood and Mungwell. He was born in 1704, but the day and place of his birth have escaped the researches of his biographers. It is, however, probable that he was born at the paternal estate, in the parish of Uphill, Linlithgowshire. The first we hear of him is in connection with his academical studies, which "he appears" to have pursued (thus uncertainly do his biographers speak of him) in the, University of Edinburgh. He displayed, while yet a boy, a marked predilection for poetry, writing verses to a number of imaginary young ladies — a habit which he preserved through life. At the age of twenty he contributed to Ramsay's Tea-Table Miscellany, embellishing it with his finest poem, "The Braes of Yarrow," the only poem he ever wrote in the Scotch dialect. At twenty-two he wrote "The Maid of Gallowshiels," a fragment which he never completed, and a poetical "Address to the Countess of Eglintoun," on sending her a copy of Ramsay's "Gentle Shepherd."
Hamilton's poetry was more distinguished for chasteness and refinement than for originality. It exhibited at once his amiable qualities and his scholarly attainments, and showed to what advantage he had studied the great poets of antiquity. Some of his translations and adaptations from Horace are graceful productions, and his translation from Homer is worthy of notice. He possessed the merit of being the first Scotch poet who wrote in the English language, properly so called; but it may perhaps reasonably be deplored in these days that Hamilton did not leave English verse alone. As an English poet he has not taken by any means a first place, whereas it is presumable, from the specimen he has left, that as a Scotch bard he might have sat side by side with Burns and Ramsay in the temple of the Scottish muse. A single stanza of the exquisite and thoroughly original ballad, the "Braes of Yarrow," is worth many volumes of such poems as "Contemplation," in which the "Triumph of Love" is sat forth in verses, elegant it is true, but such as any amiable country gentleman might indulge in who had plenty of time at his disposal, combined with literary taste.
The year 1743 is one of great importance in the life of Hamilton. In this year he met a lady to whom, for the first time probably in his experience, be found it impossible to write verses. Falling seriously in love, he married the daughter of Sir James Hall, of Dunglass, with whom his union proved extremely happy, though unfortunately but of short duration. In 1745, after only two years of wedded life, Mrs. Hamilton fell ill, thereby preventing her husband (who was as staunch a Jacobite as he was a faithful friend), from joining the standard of the Pretender. Some say that the poet actually fought at the battle of Culloden; out this has been denied. However this may be, it is certain that after his wife's death, in October, 1745, his implication with the cause of the Pretender compelled him to seek refuge in France, where he remained for several years in exile. About the year 1750 he appears to have returned to Scotland, where he took possession of the family estate as heir to his elder brother, who died unmarried. Up to 1751 he is supposed to have lived chiefly in Edinburgh, where he indulged in his old love of poetry and fictitious mistresses. Somewhere about this time his amatory passion again took a serious turn, and he married a lady (maiden-name unknown) who survived him twenty-five years, "dying in her own house" in the Canongate of Edinburgh, in September, 1779. The poet himself died at Lyons (whither he had gone for the benefit of his health) on the 25th of March, 1754. His body was brought home to his native land, and buried in the once great Walhalla of Scottish history and genius, the Abbey Church of Holyrood.
His contemporaries thought highly of his poetic gifts. The Caledonian Mercury, in announcing his death, informed the Scottish and English world, and all who had not the happiness of personal acquaintance with the deceased, "that in all the relations of life, as a son, a brother, a husband, a father, and a friend, he was dutiful, tender, steady, and affectionate; as a gentleman polite, humane, generous, and communicative; and as a man, a citizen, and a Christian, honest, brave, pious, and benevolent. The endowments of his mind in regard to genius and learning his own inimitable works can alone express, and whoever peruses them with judgment and impartiality will acknowledge that in point of language, sentiment, and numbers, Scotland boasts in Hamilton a poet little, if at all, inferior to a Dryden, an Addison, or even a Pope."
Posterity has not confirmed this flattering verdict, but consigned him to the second, if not to the third rank, in the poetical hierarchy. His popularity, however, has been great enough to justify the issue of several editions of his poems. The first appeared in 1748, three years after his death; the second in 1749; the third in 1758; the fourth in 1760; the fifth in 1794, and the sixth in 1808. He was also included in "Anderson's British Poets" — a large and not very select collection of the rhymers and versifiers, as well as of the poets, from the time of Chaucer to the close of the eighteenth century. The best and most complete edition appeared in 1850 under the editorship of Mr. James Paterson, and included several poems, previously unpublished, found in a MS. volume in the poet's own handwriting.