Perhaps it's out of jealousy. If there was a situation where Naruto was getting all the attention and power, and Sakura, feeling left out and envious, might be driven to such an extreme act in the heat of the moment in the fanfiction.
It could be due to a dark influence. Suppose she was under the influence of some dark magic or an evil force that made her lose her true self and turned her against Naruto. This could lead to her almost killing him in the fanfiction.
Perhaps in a fanfiction where the world has been completely turned upside down. If Sasuke had been tricked into becoming an unstoppable villain who was about to destroy the entire ninja world, and Sakura was somehow aiding him (maybe under a genjutsu), Naruto might feel he had no choice but to stop them by killing. Another reason could be a broken heart. If Naruto loved Sakura deeply but she constantly rejected him and chose Sasuke, and then Sasuke and Sakura betrayed him in some way, his anger and pain could lead to such a drastic act.
One possible motive could be extreme jealousy. Maybe in this fanfiction, Hinata is insanely jealous of Sakura's relationship with Naruto or her skills, and that drives her to the unthinkable act of killing.
Naruto could try to talk her out of it. He is a firm believer in the power of friendship and words. So, he would likely use his words to try and break whatever spell or wrong idea is in Sakura's head that made her want to kill him.
One possible motive could be that Sakura is brainwashed. Maybe an enemy uses some kind of mind - control jutsu on her and she becomes a puppet to kill Sasuke. Another could be extreme jealousy. If she felt that Sasuke was slipping away from her in some way, in a very dark and twisted version of the story, it could lead to her killing him.
In such a fanfiction, one possible storyline could be that Sakura is under some dark magic or mind control which makes her turn against Naruto. Another could be a huge misunderstanding where she believes Naruto has done something unforgivable to her or their friends.
A possible motive could be a creative exploration of the 'what - if' scenarios. Maybe the writer wants to see how the story would unfold if Sasuke completely lost his way. Another motive could be to create a sense of high - stakes drama. Since Sakura is an important character, her death at Sasuke's hands would be a huge shock.
One possible motive could be mind control. Maybe an enemy uses some kind of jutsu to make Naruto lose control and attack Sakura. Another could be a misunderstanding. For example, if Sakura was framed for something really bad, and Naruto in his hot - headedness believes it and attacks her. Or perhaps in a dark, alternate universe version of the Naruto world where the characters' personalities are twisted, Naruto might have a reason to attack her based on that altered personality.
It could be that his siblings have made a pact with an extremely evil entity. Naruto, with his sense of justice and loyalty to the greater good, decides that their existence in that state is too dangerous and kills them, though it would be a very difficult and heart - wrenching decision for him.
One possible motive could be a misunderstanding. Maybe Haku was disguised as someone else who was about to attack Naruto or his friends, and Naruto reacted in self - defense without realizing it was Haku. Another could be that in this fanfiction, Naruto has been somehow corrupted or influenced by a dark force that made him lose his normal judgment and attack Haku.
Another reason could be related to a prophecy. There might be a prophecy that Boruto will bring great destruction in the future, and Naruto, as the Hokage, feels it's his duty to prevent this at all costs. He might think that by killing Boruto, he can change the course of fate and protect the people he loves and the entire ninja world.