In a plot where power corrupts, perhaps a powerful magical artifact is found. Harry and Ron start to change as they get influenced by it. They think Hermione is trying to stop them from using the artifact's power for 'greater good' and turn against her. It's a classic case of good intentions going awry due to misjudgment.
One way could be through a misunderstanding. Maybe they believe Hermione has done something wrong, like they misinterpret her actions regarding a dangerous spell she was researching. So they distance themselves from her, which she sees as a betrayal.
Well, if Ron and Hermione betrayed Harry in fanfiction, it would completely shatter the core of their friendship. In the original story, their loyalty was unwavering. This betrayal could lead to Harry being isolated and more vulnerable to Voldemort. Maybe he'd be captured more easily without their support. It would also make the readers feel a sense of shock and disappointment as we've come to expect their strong bond.
Perhaps Ron was influenced by outside forces. There could have been dark magic or some other characters manipulating him. It's not uncommon in the wizarding world. Some powerful dark wizards might have preyed on Ron's insecurities to make him turn against Harry.
It could be that Ron and Hermione abandon Harry due to a prophecy that they misinterpret. They believe that by being with Harry, they will bring doom to the wizarding world. So they go into hiding. Harry, on the other hand, is determined to change the course of the prophecy. He embarks on a journey to find the truth behind it, all while feeling the pain of his friends' desertion. He has to fight against dark forces that are taking advantage of the situation.
In such a fanfiction, it might be that Harry and Ron are influenced by a powerful dark spell. This spell makes them see Hermione as a threat, so they abandon her. Hermione then has to find a way to break the spell's influence on them while also dealing with the loneliness and danger she's now in. She could seek help from other Hogwarts students or even some friendly magical creatures.
On the other hand, it could also be a turning point for Ron. It might make him determined to make amends. The slap could be the jolt he needs to fight against whatever was causing him to betray Harry in the first place, whether it was jealousy or outside influence.
One possible plot is that a magical object affects Harry and Ron's minds, making them bully Hermione. Hermione, at first, is heartbroken. But she then uses her intelligence to find a way to reverse the object's effect. Meanwhile, she also stands up to them, showing her strength. When the boys are back to normal, they are ashamed of their actions and have to make amends. This could also lead to a deeper exploration of the importance of true friendship and not being easily influenced by external factors.
Perhaps Hermione starts a secret club or organization for students who are interested in advanced magic. As Ron and Harry ignore her, she pours all her energy into this. The club gains popularity and starts to influence the way magic is taught at Hogwarts. Ron and Harry, seeing the positive changes Hermione is making without them, start to feel guilty and try to make amends.
A possible plot could be that the Muggle teacher is being targeted by a dark wizard who wants to use the teacher's knowledge of Muggle technology for evil purposes. Hermione, Ron, and Harry find out and decide to protect the teacher. They have to hide the teacher in the wizarding world and teach them basic self - defense spells.
The plot could start with Harry realizing he has deeper feelings for Hermione than just friendship. He might start spending more time with her, which causes tension between him and Ron. Eventually, he could confess his feelings to Hermione, and she might be conflicted because of her relationship with Ron.
One consequence could be a breakdown in their friendship. Harry might feel extremely hurt and isolated, which could affect his ability to fight against the dark forces. He may become more withdrawn and less trusting of others in general.