It was penned on the fly-leaf of the poet’s own copy of a book of poems by Robert Fergusson, paraphrasing Jeremiah’s Complaint in the Old Testament.

The work was authenticated back in the 1960s and will now go on public display at the Central Library in Edinburgh.

It is thought the three-stanza verse describes the writer’s lack of cash and his black-sheep status after the parents of lover Jean Armour discovered she was carrying his child.

The poem begins “Oh woe is me, my mother dear!” before bemoaning the author’s fate as a “coin-denyed Wight” who is “by lad and lass blackguarded”.

Dr Robert Irvine, of Edinburgh University, said: “Jean’s parents had sent her to relatives in Paisley, so she could have the child – twins it turned out – away from the local kirk, and to get her away from Burns.

“Burns and Jean considered themselves engaged, and Burns saw Jean going along with her parents’ plan as breaking off their engagement.

“Perhaps the Armours were ‘blackguarding’ Burns to their neighbours in Mauchline and Burns was getting black looks and turned-up noses – a bad business in a small town.”

The page of the book with Burns’ autograph will form part of an exhibition at Edinburgh’s Central Library titled “Robert Burns – the man and his music”.

The closed book will go on display from Monday, but library staff will put on a special consultation session on 24 January to examine the work in greater detail. Individual pages including the poem will be on display after that.

A spokesperson from the library said: “It is in excellent condition and is personalised as Burns’ own copy, with its original binding and the personalised initials R.B. in gilt.

“This work has never before been displayed by Central Library, and is one of many treasures it owns.

“What makes this centrepiece so exciting is not only the extra knowledge of Burns’ own reading and library, but the autograph three-stanza poem on the fly-leaf that begins ‘Oh woe is me, my Mother dear’.

“After much research by staff and the assistance of National Library of Scotland expert, Ralph McLean, the poem has been identified as published in the Glenriddell manuscript and appearing in Henley and Henderson’s 1896 edition of Burns’s works. The work was authenticated back in the 1960s and cited in James Kinsley’s Poems and Songs of Robert Burns, so we know it is really the hand of Burns himself.

“Knowing that Central Library has Burns’s own copy of Fergusson’s poems adds to the cultural heritage of the city.”

They added: “We know that Burns was much admired and was influenced by Edinburgh-born Fergusson, and indeed paid for the memorial in Canongate Churchyard.