Everyone is Atlantis looses their memory, and are stripped back to the basics of their of their personalities, no one knows who they are, except for John Sheppard, and Rodney McKay, because their immediate attraction to each other is enough proof to them that they're together. They don't hold back, and with nothing but instinct driving them, they jump straight into a relationship, the consequences of which they have to face when they recover their memories.
In another Dimension, the Ori discovered Pegasus, destroyed the Wraith, and enslaved the People, although they saw it as liberation from Wraith, and embraced Origin gladly. When the Expedition came to Atlantis, they were introduced to Origin, and were also converted, most of them becoming Priors, and heading back to Earth. An accident causes Prior Sheppard to change places with Sheppard from our Dimension. While the Prior sets about trying to convert everyone, McKay tries to get through to him, and in the other Dimension, John tries to get through to Prior Rodney.
Along with Rodney McKay, it was a Wraith that was caught in the Beam, and taken into the Dart, instead of Laura Cadman. What they were able to recover was the body of the Wraith, but with Rodney in control. Everyone is terrified of Rodney, he can’t do anything right, especially when he accidentally starts feeding off of someone. John Sheppard is the only one to try and see through Rodney’s outward appearance, and he sees his Friend, someone that he Loves; and that maybe only now he realises exactly how much.