Poe's "The Gold Bug" has some points similar to those in Doyle's "A Scandal in Bohemia," but in the main, there is more to contrast than to compare. The first point where they compare is that each tale is told by a first person narrator who is involved in the ensuing mystery as an assistant and as one to whom the main characters, Legrand and Holmes, can explain thought processes and activities.
Both stories are set in the 1800s. Poe's is mysteriously set in "October 18--," while Doyle's is set in a straightforward "March, 1888." The presentation of the dates adds to the mood of each story: to Poe's is added a mood of dark, secret mystery, while to Doyle's is added a mood of openness. Each principal character, Legrand and Holmes, has scientific enthusiasm. Legrand's is for entomology, the study of insects, "scarabaei," while Holmes's is for investigative technique, such as perfection in disguise: "he returned ... in the character of an amiable and simple-minded Nonconformist clergyman."
The contrasts between the stories are several, the most important ones are that the narrator and the principal in "The Gold Bug" are newly acquainted friends, while in "A Scandal in Bohemia," Watson and Holmes are old and close friends. The setting of Poe's is the U.S. in the South, while the setting of Doyle's is the U.K. in London. There is a decided religious background to Poe's: "Legrand ... was of an ancient Huguenot family." Holmes is a new scientific man of the Victorian age with no connection to religion: "I was half-dragged up to the altar, and before I knew where I was I found myself mumbling responses which were whispered in my ear, ...."
As the stories develop, Poe's emerges as a Gothic horror story about a gold bug, buried treasure, and skeletons of bludgeoned men: "What make him dream 'bout de goole so much, if 'taint cause he bit by de goole-bug? … a couple of blows with a mattock were sufficient ... in the pit." Doyle's develops into a successfully resolved detective mystery, albeit one in which Holmes meets his match in the person of Irene Adler: “Good-night, Mister Sherlock Holmes.” ... “I've heard that voice before,” said Holmes, staring down the dimly lit street. “Now, I wonder who the deuce that could have been.”