Sherlock leaves London for a case. While he's gone he keeps in touch with John, and the two begin to share increasingly flirty and emotionally vulnerable texts, emails, etc. and by the time Sherlock returns he's thrilled that he and John are finally ready to embark on a romantic relationship. But when he arrives home John has packed his things and moved out, leaving a bitter, angry handwritten note declaring he never wants to see or hear from Sherlock ever again. Sherlock is confused and heartbroken.

Meanwhile, John has moved far away and is looking for a new start in life after having fled from Baker Street because of the increasingly cruel, hateful, demeaning messages he had received from Sherlock while he was out of town, dashing all hopes John ever had of he and Sherlock ever becoming more than just friends.

Turns out Moriarty, technological wizard that he is, has faked all of the communication between John and Sherlock over the last few weeks. He himself generated all of the texts, emails, and perhaps even phone calls (maybe he's got some wicked good voice synthesizing software) and he's been totally manipulating both of them as part of that whole "burn the heart out of you" thing.

Of course an eventual happy Sherlock/John ending would be fantastic.

TL;DR While Sherlock is away Moriarty fakes all of the texts, emails, and phone calls between Sherlock and John. Sherlock returns home happy thinking John wants to start a romantic relationship, but John has moved out because of "Sherlock"'s cruel declarations that he has grown bored with him and wants him gone.