The book, which was sold to an anonymous bidder for £150,000 at auction last year, has been loaned to the library for a week as part of the Wha’s Like Us? exhibition, celebrating ideas and inventions originating in Scotland.
Rowling started writing the book about the boy wizard in cafes while living in Edinburgh.
There are drawings and notes on more than 40 pages of the book, including references to developments and characters later in the series and the film adaptations.
One note explains how Rowling invented Quidditch, the fictional sport played by the student wizards in the best-selling books.
The title page of the copy will be displayed on which the author has drawn a coat of arms and wrote that the book “changed my life forever”.
Curator Andrew Martin said: “Thanks to the generosity of the new owner, we are able to add this wonderful item to an exhibition which celebrates amazing achievements by Scots or from Scotland.
“The global phenomenon that is Harry Potter was already featured in the exhibition but this unique first edition makes it all the more special.”
It will go on display from Thursday.