The son of a lawyer, Hamilton published poems in Allan Ramsay's Tea Table Miscellany; he supported the Jacobite rising in 1745, went into hiding, fled to France, was pardoned, returned and eventually died at Lyons. Hamilton's ballad, "Braes of Yarrow" was once one of the best-known eighteenth-century poems.
The faithful few: an ode inscribed to all lovers of their country. 1734.
Eighteenth epistle of the second book of Horace imitated. 1737.
Three odes. 1739.
Contemplation: the triumph of love. 1747.
Poems on several occasions. 1748.
Poems and songs, ed. James Paterson. 1850.