Years ago, a rare-books dealer browsing at an estate sale in Rochester came across an unusual manuscript, dated 1858. The family selling it said little about where it had been for the last 150 years. It appeared never to have left upstate New York.

Scholars now believe that the mystery manuscript is the first recovered memoir written in prison by an African-American, a discovery that Yale University says it made after authenticating the document and acquiring it for its Beinecke Rare Book & Manuscript Library.

The 304-page memoir, titled “The Life and Adventures of a Haunted Convict, or the Inmate of a Gloomy Prison,” describes the experiences of the author, Austin Reed, from the 1830s to the 1850s in a prison in upstate New York.

Caleb Smith, a professor of English at Yale who has written extensively about imprisonment, said he believed the manuscript to be authentic. Reed’s account was corroborated through newspaper articles, court records and prison files, with help from Christine McKay, an archivist and researcher who also works for the Schomburg Center for Research in Black Culture in Manhattan.