On the phone, Moriarty says to Sherlock, "consider me a spider: I sit motionless at the center of my web. That web has a thousand radiations and I know well every quiver of each of them". This is a reference to Sherlock Holmes's description of Moriarty in "The Final Problem", Arthur Conan Doyle's intended final short story for the character.
When Sherlock tells Watson about Irene Adler, part of his description is taken almost verbatim from the original short story "A Scandal in Bohemia".
The chalk board in Captain Gregson's office behind Joan reads "What kills the skunk is the publicity it gives itself", a quote by Abraham Lincoln.