The son of William Laing, a bookseller in Edinburgh, where he was born, he was educated at the Canongate Grammar School. At fourteen he was apprenticed to his father. Shortly after the death of the latter in 1837, Laing was elected to the librarianship of the Signet Library, a post he retained till his death. Apart from an extraordinary general bibliographical knowledge, Laing was best known as a lifelong student of the literary and artistic history of Scotland. He published no original work, but contented himself with editing the works of others. Of these, the chief are--William Dunbar's Works (2 vols., 1834), with a supplement added in 1865; Robert Baillie's Letters and Journals (3 vols., 1841-1842); John Knox's Works (6 vols., 1846—1864); Poems and Fables of Robert Henryson (1865); Andrew of Wyntoun's Orygynale Cronykil of Scotland (3 vols., 1872-1879); Sir David Lyndsay's Poetical Works (3 vols., 1879).
For over fifty years, Laing was a member of the Society of Antiquaries of Scotland, and contributed over a hundred separate papers to their Proceedings. He was also the long-standing secretary to the Bannatyne Club, many of whose publications were edited by him. He was struck with paralysis in 1878 while in the Signet Library, and it is said that, on recovering consciousness, he looked about and asked if a proof of Wyntoun had been sent from the printers. He died a few days afterwards, in his eighty-sixth year. His library was sold by auction, and realized £16,137. To the University of Edinburgh he bequeathed his collection of manuscripts.
See the Biographical Memoir prefixed to Select Remains of Ancient, Popular and Romance Poetry of Scotland, edited by John Small (Edinburgh, 1885); also TG Stevenson, Notices of David Laing with List of his Publications, etc. (privately printed 1878).