Mr. Romito’s index to the Calhoun volumes listed the letter as the property of the New York State Library. He alerted the library, and was told that the matter was being looked into.

Image An 1823 letter by John C. Calhoun was offered on eBay and led to the discovery of a thieving archivist.

“I didn’t know what was going to happen,” Mr. Romito said. So he bid on the item himself. “I knew I wasn’t going to end up buying it  I wasn’t going to pay for it  but I put in what I thought was a very high bid to try and keep it from going somewhere else. The government can be slow.”

Mr. Romito’s discovery led quickly to a state investigation, and on Monday resulted in charges being filed against the would-be seller, Daniel D. Lorello. Mr. Lorello, 54, has worked at the New York State Archives in Albany for 29 years. The state attorney general’s office has charged him with several criminal counts, including grand larceny, criminal possession of stolen property, and scheming to defraud.

In a handwritten confession that the authorities obtained from Mr. Lorello on Thursday, he said he had been illegally selling rare books and documents from the state’s collections since 2002. His thefts intensified last year, he wrote, “because my daughter, Maria, unexpectedly ran up a $10,000 credit card bill.”

“I estimate that I’ve taken more than 300 or 400 items in 2007 alone,” Mr. Lorello wrote. The attorney general’s office said he sold them on eBay and at collectors’ trade shows. Robin L. Baker, a deputy attorney general, said at a news conference that investigators had discovered “more than a dozen boxes of stolen items” at Mr. Lorello’s home in Rensselaer. She said they were believed to form the majority of the stolen documents.