Complex sentence: When he attempted to sell the formula to the Central Powers, he was discovered by Holmes, who killed Moriarty, but only after Moriarty managed to fatally wound Doctor Watson.
Split into simpler sentences: When he attempted to sell the formula to the Central Powers, he was discovered by Sherlock Holmes. Moriarty was killed by Holmes, but before his death, Moriarty managed to fatally wound Doctor Watson.