Allan Cunningham (7th December 1784 - 30th October 1842) was a Scottish poet and author who was born at Keir, near Dalswinton, Dumfries and Galloway, and first worked as a stonemason's apprentice. His father was a neighbour of Robert Burns at Ellisland, and Allan with his brother James visited James Hogg, the "Ettrick shepherd", who became a friend to both. Cunningham's other brothers were the naval surgeon Peter Miller Cunningham (1789–1864) and the poet, Thomas Mounsey Cunningham (1776–1834).
Cunningham gave his leisure to reading and writing imitations of old Scottish ballads. In 1809 he collected old ballads for Robert Hartley Cromek's Remains of Nithsdale and Galloway Song; he sent in, however, poems of his own, which the editor inserted, even though he may have suspected their real authorship. It gained for him the friendship of Walter Scott and James Hogg.