Perhaps there was also a sense of self - preservation. If Lucius were to harm Harry's daughter, it could lead to a major upheaval in the wizarding world. Snape, being in a position where he had to maintain some sort of balance, might have stepped in to prevent chaos that could ultimately endanger his own life or his standing in the wizarding community.
Snape could also be acting out of a sense of justice. Lucius was a Death Eater, and Snape, despite his own past as a Death Eater, had turned against Voldemort. Saving an innocent, especially Harry's daughter, from Lucius would be in line with his new allegiance to the side of good.
Another motive could be related to his complex relationship with Dumbledore. Dumbledore might have asked Snape to look out for Draco, and Snape, being obedient to Dumbledore in many ways, would do so to fulfill his request. Also, Snape might believe that protecting Draco is part of a bigger plan to maintain the balance in the wizarding world.
One possible motive could be that Snape is still deeply influenced by his loyalty to Voldemort in this fanfiction. Maybe Voldemort has some hold over him that forces him to do the unthinkable. Another reason could be a misunderstanding. Snape might believe that Harry has turned to the dark side or is about to, and he decides to take preemptive action to stop what he thinks will be a great evil.
Snape might use his skills in potions or dark magic to surprise Lucius. For example, he could quickly brew a potion that temporarily immobilizes Lucius, allowing him to snatch Harry's daughter away to safety.
Maybe Snape has some sort of premonition or knowledge that Harry is going to be crucial in the fight against dark forces in the future. So, in order to ensure that future, he steps in to save Harry from whatever danger his parents' situation might put him in. He might also be trying to atone for past mistakes or grudges he held against Harry's father by protecting his son.
One possible motive could be Snape's complex relationship with Harry's father. Snape might see Harry as a way to get back at James in some twisted way. He could also be acting out of a sense of duty to the Dark Lord, believing that taking Harry by force is part of some larger plan to gain power or favor.
Perhaps in the fanfic, Snape discovers a powerful and dangerous magic that he wants to use for what he believes is the greater good, but Harry sees it as a threat. Harry has always been wary of Snape, and this new discovery could be the tipping point. Also, if Snape were to make a deal with a dark force in order to gain knowledge to defeat Voldemort but Harry misinterprets his intentions, it could lead to Harry killing Snape.
One possible motive could be a misunderstanding. Maybe Snape is framed for something really bad, like a dark magic plot against Hogwarts. Harry, in his haste to protect the school and his friends, believes Snape is guilty and takes drastic action. Another reason could be if Snape accidentally endangers someone Harry loves dearly, like Ginny or Ron, and Harry's emotions get the better of him in the heat of the moment.
One motivation could be Snape's sense of duty as a teacher. Despite his dislike for Harry in some ways, he still has an obligation to protect the students. So, when he sees Lockhart endangering Harry, he steps in.
In some fanfictions, Snape could have his own personal vendetta against Dumbledore. Maybe Dumbledore has wronged Snape in the past, and when he sees Harry as a potential victim of Dumbledore's schemes, he decides to help Harry. Another reason could be that Snape has a new understanding of the prophecy and believes that Dumbledore's way of handling it is wrong, so he steps in to help Harry.
He could feel a sense of guilt. Snape has always had a role in Harry's life, sometimes as an adversary. Knowing that Harry has these scars which are a result of Voldemort's actions, and Snape being involved in some way with Voldemort in the past, he might feel responsible on some level.