Question: When marshal Ney and his troops encounter Napoleon, he tells them if they want to kill their emperor, there he is, but instead of killing him, they defect to him despite being ordered to fire. Is this a work of fiction, or did it happen in real life?
Answer: I think the film's dramatisation of this particular incident, when the French army defected from the restored Bourbon royal family back to the Emperor Napoleon might owe something to the painting NAPOLEON RETURNED painted in 1818 by Charles Steuben (also called Charles De Steuben and Karl Steuben) a German who became a nationalised (and patriotic) Frenchman https://commons.wikimedia.org/wiki/File:Napoleon_returned.jpg.
Answer: Yes, that is pretty much what happened, so long as we allow for translation convention. (Napoleon and his armies spoke 19 century French, while the actors in the 1970 film speak 20 century English). After Napoleon's first abdication Marshall Ney submitted to the returning Bourbon monarch, Louis XVIII. When Napoleon returned to France, Marshall Ney was given command of an army to apprehend Napoleon The Emperor Napoleon with a small group of imperial guardsmen confronted Marshall Ney with a massively larger and better-equipped army. Many people expected a bloodbath. Instead, Napoleon waked out in front of his guard, confronted the French army and called out that if any soldier wished to shoot him, this would be the best chance they would ever have! The army simultaneously rushed to greet their emperor, Marshall Ney followed and submitted to Napoleon. This bit of the film is as historically accurate as can reasonably be expected and shows how Napoleon could electrify an army.
Answer: This is decidedly fiction. The historical Ney already published a boastful proclamation (that Napoleon later said disgusted him), declaring the rule of the Bourbons to be over, before he met with Napoleon (March 15). The scene where Napoleon offered himself to be shot had happened several days earlier, with the 5th regiment of the line, before Napoleon even reached Grenoble. It's an entirely different event from Ney's defection.