<P> In April 1846, Hawthorne was officially appointed as the "Surveyor for the District of Salem and Beverly and Inspector of the Revenue for the Port of Salem" at an annual salary of $1,200 . He had difficulty writing during this period, as he admitted to Longfellow: </P> <P> I am trying to resume my pen...Whenever I sit alone, or walk alone, I find myself dreaming about stories, as of old; but these forenoons in the Custom House undo all that the afternoons and evenings have done . I should be happier if I could write . </P> <P> This employment, like his earlier appointment to the custom house in Boston, was vulnerable to the politics of the spoils system . Hawthorne was a Democrat and lost this job due to the change of administration in Washington after the presidential election of 1848 . He wrote a letter of protest to the Boston Daily Advertiser which was attacked by the Whigs and supported by the Democrats, making Hawthorne's dismissal a much - talked about event in New England . He was deeply affected by the death of his mother in late July, calling it "the darkest hour I ever lived". He was appointed the corresponding secretary of the Salem Lyceum in 1848 . Guests who came to speak that season included Emerson, Thoreau, Louis Agassiz, and Theodore Parker . </P> <P> Hawthorne returned to writing and published The Scarlet Letter in mid-March 1850, including a preface that refers to his three - year tenure in the Custom House and makes several allusions to local politicians--who did not appreciate their treatment . It was one of the first mass - produced books in America, selling 2,500 volumes within ten days and earning Hawthorne $1,500 over 14 years . The book was pirated by booksellers in London and became a best - seller in the United States; it initiated his most lucrative period as a writer . Hawthorne's friend Edwin Percy Whipple objected to the novel's "morbid intensity" and its dense psychological details, writing that the book "is therefore apt to become, like Hawthorne, too painfully anatomical in his exhibition of them", though 20th - century writer D.H. Lawrence said that there could be no more perfect work of the American imagination than The Scarlet Letter . </P>

Where did nathaniel hawthorne write the scarlet letter