The surprise twist is that the "Second Stain," a dangerous document that the villain is trying to steal, turns out to be a forged document created by the villain himself. He's manipulating the situation to gain political power and discredit his enemies.
This twist makes for a gripping conclusion, as it reveals the villain's cunning and emphasizes the importance of careful investigation and critical thinking that Sherlock Holmes is known for.