Moriarty has been trying to beat Shylock, but he didn't succeed. In order to frame Shylock, he pointed all the evidence at the cost of his life and tried to force Shylock to commit suicide. So moriarty committed suicide.
"You are me, I am you" generally means that Shylock is blackened. He is a person like moriarty. Just because Xia is on the side of justice does not mean that he is a just person. All cases are handled by Sherlock, an actor in moriarty's Sherlock.
Extended data
The second season of Sherlock continues the plot of the first season of Sherlock, starting with the first formal meeting between Sherlock, Watson and moriarty threatened by bombs and sniper rifles. Then, Shylock met Irene Adler, a mysterious woman who is both kind and evil, in an important entrustment case at Buckingham Palace.
An equal opponent, a woman who makes him move. This time, moriarty convinced the public that all Shylock's deeds were fictitious, making him a discredited pseudo-hero.