In some fanfictions, Harry might be saved by NCIS through their excellent investigative skills. They could uncover a plot against Harry in time, using their resources to track down the bad guys before any harm comes to Harry.
In fanfiction, it could be that the NCIS has some sort of magical knowledge or artifacts. Maybe they've been dealing with cases that are on the fringes of the wizarding world without realizing it. When they discover that Harry Potter is in danger, they use this knowledge or these artifacts to save him. For instance, they could have an ancient amulet that can counter dark magic spells aimed at Harry.
Another possibility is that there is some sort of crossover magic. Maybe a spell goes wrong and links the NCIS world to the Harry Potter world. The NCIS agents, being the resourceful people they are, quickly adapt to the situation. They learn about the danger Harry is in, perhaps from Hermione who has some knowledge of both worlds now. Then they use their own brand of justice and skills to save Harry from whatever dark forces are after him.
One common scenario could be Harry being framed for a crime he didn't commit. NCIS steps in to investigate and realizes the truth, thus saving Harry from unjust imprisonment.
In some fanfictions, Voldemort might save Harry due to a complex change in his character. For example, he could discover a newfound sense of respect for Harry's power or courage. Maybe he realizes that Harry is the only one who can truly understand him, and in a moment of strange kinship, he decides to save Harry from a greater threat that is about to befall them both.
The Malfoys could save Harry in fanfiction because of a personal debt. Maybe Harry once unknowingly did something that benefited the Malfoys greatly. This could be as simple as preventing a disaster from befalling their family business or saving the life of a family member secretly. When the time comes, the Malfoys feel obliged to return the favor and save Harry from whatever danger he is in. Also, it could be part of a complex plot where the Malfoys are trying to redeem themselves, and saving Harry is a big step in that direction.
It depends on the specific plot of the vampire fanfiction. There could be a scenario where the vampire has a prophetic vision about Harry's importance to the world or to their own existence. So, to safeguard that future, the vampire steps in and saves Harry. It might also be that the vampire is in love with Harry (a common trope in fanfiction) and would do anything to keep him safe, thus saving him from various perils.
There are fanfictions where a powerful wizard or witch, not part of the main Hogwarts faculty, discovers Harry's situation. Maybe an old hermit wizard who lives on the outskirts of the wizarding world. This wizard uses his magic to create a diversion at the Dursleys' place and then whisks Harry away to his own hidden cottage where he teaches Harry different kinds of magic not taught at Hogwarts.
In fanfiction, Harry Potter as an NCIS agent might use his magical skills in unique ways. For example, he could use a spell to quickly analyze evidence that would otherwise take hours for normal agents. His ability to sense danger, developed from his years fighting Voldemort, would make him excellent at detecting threats on the job.
His magic could be used for forensic purposes. For instance, the 'Reparo' spell could fix broken evidence so it can be analyzed better. Also, the 'Accio' spell could be used to quickly retrieve evidence from a crime scene.
Another way Harry could be saved is through the help of his friends. In the wizarding world of Snarry fanfiction, his friends like Hermione and Ron might notice the stalker situation. They could work together to create a plan. Maybe they would use a combination of magic and Muggle - like detective work. For instance, Hermione's research skills could help them find out more about the stalker's motives and weaknesses, and Ron's loyalty and courage would ensure they are there to physically protect Harry if needed.