The story is narrated by Emil Sinclair, who states that he will talk about a certain event in his life that happened when he was ten years old. When he was a child, he was always wary of two realms existing at the same time, one of 'light' which consisted of everything good in the world, and the other of 'dark' which was strewn with immoral things. Although he considered himself to be part of the realm of light, he was also attracted to the dark world.
Sinclair is first introduced to the 'dark world' when he invents a story about stealing apples to seem intimidating and relatable to his peers. The bully of the group, Franz Kromer, uses this opportunity to his advantage and tells him that the owner of the orchard would pay the person who would give away the culprit. He manipulates Sinclair to give him money so that he would keep his mouth shut. Sinclair is troubled by this incident and believes that this would lead him to get involved in further misdeeds. Kromer makes Sinclair do embarrassing stunts when Sinclair cannot pay his dues.
A new student, Max Demian, joins Sinclair's class and he has an aura of maturity about him. After their class, Demian has a conversation with Sinclair about the story they had assessed in their lecture. Demian analyzes the story differently than how it had been taught in class. According to Demian, in the story of Cain and Abel, Cain was a truly worthy man and others were threatened by it. So, they perceived him as evil and defamed him. Demian says that the ones who dismissed Cain as evil were 'weak'. Sinclair is impressed by this interpretation. Demian also had a lot of knowledge about Sinclair's home and he makes a remark about how the arch above the doorway represented a sparrow hawk.
Meanwhile, Kromer was still torturing Sinclair and asking for more money until it got to the point where Sinclair had to start stealing. Kromer also asks for Sinclair's sister, which frightens him deeply. He shares this with Demian, who says that Kromer must be stopped no matter what, even if it meant that he had to be killed. Sinclair objects to this, and Demian promises to do something about the situation. A week later, Sinclair runs into Kromer, but Kromer walks away from him, looking scared. Relieved at his freedom, Sinclair thanks Demian for his help but cannot get the information out of him about how he managed to scare Kromer away. After this, Sinclair returns to his family, away from Kromer and Demian.
Years pass and Sinclair finds himself wondering how to balance the moral values which had come with his upbringing and his creeping sexual desires. All these years he only had online contact with Demian and one day, Sinclair learns that Demian would be doing the same Confirmation classes with him. Initially, he feels a bit awkward but the ice is broken when the story of Cain and Abel is being taught in their class and they share a look when the pastor talks about Cain's mark. After this class, they begin to sit next to each other.
Sinclair perceives how Demian exerts a certain aura in the classroom and holds everyone in a trance of sorts as he plays psychological tricks on them. Demian tells Sinclair that by focusing hard enough, he can read the minds of people he is scrutinizing. Little by little, Sinclair starts becoming skeptic about religion but he still respects the values and other people's opinions. A discussion about the crucifixion with Demian startles Sinclair. Demian says that he believes a man does not only worship all that is good; he must also revere the devil or a God which is both good and evil. This matches with Sinclair's previous ideologies, but Demian does not discuss further when Sinclair wants to.
After Confirmation classes are over, Sinclair is sent off to a boarding school. After a year, he suddenly runs into Alfons Beck, who takes him to a bar. Having little tolerance for alcohol, Sinclair loosens up and spills his thoughts on the different interpretation of the story of Cain and Abel. Beck suggests that he fraternize with women more, which introduces Sinclair to a different world. He associates with people who drink and sleep with women but he himself never does the latter. He wants to do it with someone he would love deeply and truly. However, his actions were known all around the school and his father even visited him twice and told him to fix his act. Sinclair slowly becomes more uncaring.
One day, Sinclair encounters a girl at a park and he falls in love with her. He begins to worship her and he changes his personality, becoming more serious and responsible. He starts to paint and he paints a picture of her, but once the painting is finished, he realizes that the picture is of Demian. This makes him realize how much he misses Demian. Demian had apparently been disappointed in Sinclair for his drinking habits when they had met during one of Sinclair's vacations. Sinclair dreams of the sparrow hawk and Demian. When he wakes up, he paints the coat of arms and sends the painting to Demian.
Sinclair finds a note in class, which mentions the name 'Abraxas'. During his lecture, the teacher talks about Abraxas, saying that he is a figure who is both satanic and godlike. Meanwhile, Sinclair has a series of dreams about his home and the sparrow hawk. In his dream, he goes to hug his mother but she turns into a Demian lookalike. Sinclair is uncertain about his plans for university.
Sinclair regularly listens to organ music issuing from inside a church in town. One day, he decides to follow the organist. The organist's name is Pistorius, and they converse about Abraxas and Sinclair tells him about the note. Pistorius invites Sinclair to his home to listen to organ music and meditate together. Pistorius, a former student of theology, presents his ideas about the human mind and how it contains everything that was once in the soul of men. His theories further develop Sinclair's thought process.
Pistorius becomes a mentor to Sinclair and they discuss Abraxas and the powers and boundaries of the human mind. Knauer, Sinclair's classmate, approaches him and talks about his own practices and tells him that he is celibate but he is struggling to maintain it. Sinclair advises him to act on his desires, which angers Knauer. During the last few weeks of school, Knauer tries to get close to Sinclair but fails. Sinclair is obsessed with the painting and the woman in his dreams who looked like Demian. With time, he understands the boundaries of Pistorius's mind and he chastises Pistorius for being antiquarian. Pistorius is deeply offended. Sinclair loses his guide and he has mixed feelings about it.
Sinclair visits Demian's old house and asks about their current whereabouts. The owner shows him an old photo, and Sinclair instantly recognizes Demian's mother as the person he had been dreaming about and the subject of his painting. He reconciles with Demian and visits his home. He is very excited to finally meet his mother and she welcomes him as one of her closest companions and tells him her real name, Frau Eva. Sinclair and Demian continue their discussions about their nihilistic ideas. At this point they have become immune to religion. Sinclair also grows closer with Eva, who tells him that he must submit himself to her completely to win her over. One day, Sinclair observes a manifestation of the sparrow hawk among the clouds and Demian tells him that this is a bad omen, but he does not elaborate.
Sinclair spends the summer with Demian and Eva in solace but he is still troubled. One fateful day, Sinclair has a feeling of impending doom and he tries to summon Eva. Demian appears, bearing the news of the coming war with Russia and how he will have to go off to battle. Sinclair says that he had summoned Eva and Demian says that she had sent him. Eva assures Sinclair that she will always send someone like her whenever Sinclair needed her.
Sinclair is also sent to fight. He hallucinates about Eva and sees an image of her on the clouds with the mark of Cain on her forehead. Stars spring out from the mark and one of the stars hit Sinclair. He is found severely injured on the battlefield. He is brought to a hospital and is taken care of. On the bed next to him lies Demian. Demian asks him if he remembers Franz Kromer. They smile at each other and Demian tells him that whenever he needs him, he must look within himself as Demian lives within him. The story ends with Demian giving Sinclair a kiss on behalf of Frau Eva.