Warner Bros./Courtesy Everett Collection Alan Rickman as Severus Snape
Excerpts from Alan Rickman's diaries are giving insight into the late actor's role as Severus Snape in the Harry Potter film series and why he decided to continue playing the character amid tough times and desires to quit.
In the diary entries, which were published online by The Guardian on Saturday, Rickman detailed that he wanted to leave the franchise in 2002, one month after the release of the second film: Harry Potter and the Chamber of Secrets.
"Talking to [agent] Paul Lyon-Maris about HP exit, which he thinks will happen," Rickman wrote in an entry dated Dec. 4, 2002. "But here we are in the project-collision area again. Reiterating no more HP. They don't want to hear it."
The actor decided to stay with the franchise, however, after he was diagnosed with an aggressive form of prostate cancer in 2005, ahead of filming for Harry Potter and the Order of the Phoenix, the franchise's fifth installment.
After doctors opted to remove his entire prostate through surgery at a Tennessee hospital, Rickman wrote a journal entry detailing his decision to stay on as Snape in the beloved fantasy saga.
"Finally, yes to HP 5. The sensation is neither up nor down. The argument that wins is the one that says: 'See it through. It's your story,' " he wrote.
Never miss a story — sign up for PEOPLE's free daily newsletter to stay up-to-date on the best of what PEOPLE has to offer, from juicy celebrity news to compelling human interest stories.
Rickman died of pancreatic cancer in January 2016 at age 69. His diary entries, which span 25 years of his life, will be published as a book, Madly, Deeply: The Diaries of Alan Rickman, out next month.
In other Potter-centric entries, Rickman also wrote about his first meeting with series creator J.K. Rowling and how he was let in on the history of Snape's character by the author.
"She nervously lets me in on a few glimpses of Snape's background. Talking to her is talking to someone who lives these stories, not invents them," Rickman wrote in 2000.
Want to get the biggest stories from PEOPLE every weekday? Subscribe to our new podcast, PEOPLE Every Day, to get the essential celebrity, entertainment and human interest news stories Monday through Friday.
In a 2007 entry, Rickman detailed his thoughts on Snape's death in Harry Potter and the Deathly Hallows, writing that he had always known about the love story between his character and Harry's mother, Lily Evans Potter.
" … I have finished reading the last Harry Potter book," he said. "Snape dies heroically, Potter describes him to his children as one of the bravest men he ever knew and calls his son Albus Severus."
"This was a genuine rite of passage," Rickman continued. "One small piece of information from Jo Rowling seven years ago – Snape loved Lily – gave me a cliff edge to hang on to."
RELATED VIDEO: Daniel Radcliffe Reveals Which Harry Potter Costar "Genuinely Scared" Him for Years
In one other excerpt, this time from March 2010, Rickman detailed the final day of filming the last Harry Potter film alongside star Daniel Radcliffe.
"All a bit hard to believe. I think even Daniel was shocked by the finality," he wrote. "Cameras were everywhere, it seemed (docu ones)."
"[I am asked] 'So how does it feel?' Before you've felt it, before the feeling has a name. 'It's private,' I managed, 'and I'm not sharing it with that' pointing at his lens," Rickman continued. "Something is in those cans and it is finished. Thanks, Jo."
Madly, Deeply: The Diaries of Alan Rickman will hit shelves on Oct. 4.