" .... there is a degree of heroism in his obstinacy." (Warton on Chatterton)Not to solve Bartleby but wow, Maryhelen C. Harmon makes a persuasive case for Thomas Chatterton (1752-1770) as the model of Melville's eternally mysterious and uncompliant scrivener. As Harmon shows, Melville refashioned many suggestive passages and hints from extensive biographical materials in the two-volume work he had purchased in London in December 1849, The Poetical Works of Thomas Chatterton.
Some links to aid further study
Maryhelen C. Harmon on Melville's "Borrowed Personage"
Sealts Number 137 entry at Melville's Marginalia Online
Volume 1, The Poetical Works of Thomas Chatterton (1842 Cambridge edition at archive.org)
Volume 2, The Poetical Works of Thomas Chatterton (1842 Cambridge edition at archive.org)
1853 Putnam Text at Bartleby, the Scrivener
In one of the verse epigraphs to The Encantadas, Sketch Eighth, Melville adapted lines from Chattertons' minstrel song in Aella. Chatterton's and Melville's versions are
presented for comparison here.