The appearance of Egon's ghost in Ghostbusters: Afterlife took some by surprise, but its possibility was hinted at in 2017. Certainly, it felt brave to even attempt bringing Egon Spengler back into the Ghostbusters franchise following the death of actor Harold Ramis in 2014. The need to honor the character and the actor would necessarily have caused a certain amount of worry for the filmmakers and could easily have been seen as distasteful, both to fans and Ramis' family.
In the final act of Ghostbusters: Afterlife, Egon Spengler took his place alongside his fellow Ghostbusters Ray Stanz (Dan Aykroyd), Winston Zeddemore (Ernie Hudson), and Peter Venkman (Bill Murray) as they, once again, stopped Gozer the Gozerian from bringing about the apocalypse. Given that Ghostbusters: Afterlife was a reboot heavy with nostalgia, Egon, appearing as a ghost to help his granddaughter, Phoebe (Mckenna Grace), and the other Ghostbusters, trap the Sumerian God, was a fitting end for the character. At the same time, it also provided a loving tribute to a departed friend as the Ghostbusters said the things to him, that they wished they had said when he was still alive.
Related: Ghostbusters Theory Fixes Afterlife's Egon Family Plot Hole
Writer/Director Jason Reitman has claimed that he was working on ideas for Ghostbusters: Afterlife for years. So, the idea for Egon's cameo may also have been years in the making. Indeed, at San Diego Comic-Con in July 2017, Ivan Reitman, the director of Ghostbusters and Ghostbusters II, and the father of Jason, responded to an audience member asking if CG could be used on the original cast by saying: "It's possible… it's something we're thinking of. HINT."
He did not say whether a CG Harold Ramis would be
Read more on screenrant.com