In Nathaniel Hawthorne's novel The Scarlet Letter, the General is a minor character who appears in the Introduction called "The Custom House." This Introduction, originally written by Hawthorne as an independent and unrelated short story, sets the frame from which the story of Hester Prynne, Pearl and Reverend Dimmesdale is told. General Miller is the head customs collector at Salem Custom House, a government installation for collecting customs duties on items coming into America through the Salem seaport. He enters the story because the narrator of "The Custom House," who is presumed to be Nathaniel Hawthorne himself speaking as the narrator, takes a position at there and thus meets that General and the other colorful employees, who all shave either inherited their rather low-key work positions in customs or been awarded their positions as retirement rewards for other services rendered to the government.
Typical of this trend, General Miller was awarded his position for his service in and record as a war hero of the War of 1812. At the time that the narrator meets him, he has served twenty years at the Salem Custom House:
[T]he Collector, our gallant old General, who, after his brilliant military service, subsequently to which he had ruled over a wild Western territory, had come hither, twenty years before, to spend the decline of his varied and honourable life.
This Introduction is relevant to the story of The Scarlet Letter because it is at the Custom House, or "Custom-House" as the Introduction puts it, that the narrator finds the package that tells the story of Hester Prynne. The General is important to the story because it can be argued that Hawthorne uses him to foreshadow both the great weight that an error can have on a conscience imbued with keen integrity and the ability of some, like Hester and Pearl, to survive great plights:
His integrity was perfect; it was a law of nature with him, rather than a choice or a principle; .... A stain on his conscience, ... would trouble such a man ... though to a far greater degree ... I had met with a person thoroughly adapted to the situation which he held.