A book rhyme is a short poem or rhyme that was formerly printed inside the front of a book or on the flyleaf to discourage theft or to indicate ownership.
Book rhymes were fairly common in the United States during the 18th and 19th centuries, but the printing of bookplates pushed them out of use.
Book rhyme Wikipedia
One of the most common is:
The end line has several variations,
The title of Thornton Wilder's novel "Heaven's My Destination" and Alfred Bester's novel The Stars My Destination play on the final line.
A typical example of a book rhyme features prominently in M.R. James' ghost story A Warning to the Curious: