A dark wizard or witch from outside Hogwarts could be the main antagonist. They might target Harry specifically because of his reputation as the 'Chosen One' and use their influence to get him expelled from Hogwarts so that he is more vulnerable and easier to attack.
Perhaps Harry accidentally unleashes a powerful and uncontrollable magic spell within the school grounds that causes a great deal of damage. Despite it being an accident, the Hogwarts administration, fearing further chaos, decides to expel him. Harry would then have to go on a journey to learn more about this magic and how to control it, all while trying to prove to Hogwarts that he is worthy of being readmitted.
In some fanfictions, Harry might be expelled for being wrongly accused of using dark magic. Maybe someone framed him by planting dark magic items in his dorm. Another reason could be that he continuously breaks school rules in a way that the school can't tolerate, like sneaking into the Forbidden Forest too many times without permission.
After being expelled, Harry's life takes a major turn. He might have to find alternative ways to continue his magical education. Maybe he seeks out some rogue wizards who are willing to teach him in secret. Socially, he could be ostracized by his former friends at Hogwarts who are afraid of getting in trouble for associating with him. He also has to deal with the disappointment of his mentors like Dumbledore, if they don't support his expulsion. His living situation might change too. He could no longer stay at Hogwarts, and might have to find a new place to live, perhaps with some relatives who are not as understanding as the Weasleys. This whole situation could make him more determined to prove his innocence or fight against the system that expelled him.
One possible reason could be that he's wrongly accused of a serious crime, like using dark magic. In the wizarding world, such accusations can lead to expulsion. Another reason might be that he's framed by a powerful enemy who wants to get him out of Hogwarts. For example, a Death Eater could plant false evidence against him.
His friends would be devastated. Hermione, for example, would probably try everything she could to clear his name. She might search through every book in the library to find a loophole or evidence to prove Harry's innocence.
They would probably be shocked at first. I mean, Hogwarts reading fanfiction? It's a strange concept. But then they might be really curious about what Hogwarts is reading. They could try to get their hands on the same fanfiction to see what all the fuss is about.
One possible reason could be that the author of the fanfiction wants to explore a different storyline. Maybe they want to show Harry facing challenges outside the familiar Hogwarts environment, like in the wizarding world at large or in Muggle society.
He might lose the support system he had at Hogwarts. His friends like Ron and Hermione would be separated from him, which could lead to changes in their relationships. They might have to find new ways to communicate and support each other.
In the fanfiction world, Harry might be the heir to Hogwarts if there was some sort of magical pact made generations ago. For example, perhaps one of his ancestors had a special role in the creation or protection of Hogwarts, and this role was passed down through the family. It could also be that his unique magical abilities, like his ability to resist Voldemort's attacks from a young age, are signs of a deeper connection to Hogwarts itself. This connection could be what designates him as the heir in the fanfiction's plot.