Kannazuki no Miko is the story of Himeko and Chikane, the reincarnations of the Solar and Lunar Miko, respectively. They are two high school girls going to the prestigious Ototachibana Academy of Mahoroba, Japan. When an ancient evil rises once more, the girls are plunged into destiny as their long-sealed personas awaken to defend the world against the eight Orochi, who are the eight heads of Yamata no Orochi of Japanese folklore.
The manga goes into more detail on the relationship between Himeko and Chikane. In the end, Himeko chooses to be incarcerated forever in the shrine with Chikane. At the end, it also shows that a number of years later two twin girls are born and are actually Himeko and Chikane, with the memories and feelings for one another intact.
In the anime, Himeko's memory of Chikane is taken away after Chikane sacrifices herself for Himeko and is incarcerated in the shrine. Though Chikane is ultimately reincarnated and their feelings for each other are intact, they are without past memories of one another; their connection is rather sensed through instinct. At the end of the anime, all the Orochi heads go back to their original lives and Himeko is seen walking down a street intersection. As she walks during the post-credits, she comes across Chikane in her new human world body and instantly senses that she is meant to be with this person. The two hug, and narrate how they will always find their way back to each other.