The 75-year old told BBC News and The Guardian that he was diagnosed with stage 3 angioimmunoblastic T-cell lymphoma during the publicity tour for the latest Jurassic Park film, Jurassic Park: Dominion, in March last year.
During the tour, Neill noticed lumpy glands in his neck and said when doctors told him he had cancer, the diagnosis made him "take stock of things."
He said writing his book, Did I Ever Tell You This?, helped him to cope.
"I found myself with nothing to do," Neill said in an interview with The Guardian.
"And I'm used to working. I love working. I love going to work. I love being with people every day and enjoying human company and friendship and all these things.
And suddenly I was deprived of that. And I thought, 'What am I going to do?'
"I never had any intention to write a book. But as I went on and kept writing, I realised it was actually sort of giving me a reason to live and I would go to bed thinking, 'I'll write about that tomorrow … that will entertain me.'
"And so it was a lifesaver really, because I couldn't have gone through that with nothing to do, you know.
"I didn't think I had a book in me, I just thought I'd write some stories. And I found it increasingly engrossing."
He said the book came out in record time, despite not using a ghost writer.
"The thing is, I'm crook. Possibly dying," he wrote in chapter one.
"I may have to speed this up."
Neill told The Guardian he received chemotherapy at first but moved on to a new drug when the initial treatment failed.
He said he is in remission, although will have to take the drug for the rest of his life.
Non-Hodgkin's lymphoma is a relatively rare cancer that develops in the lymphatic system.
Neill has appeared in more than 70 films, working alongside actors including Meryl Streep, Cate Blanchett and Jeff Goldblum.
His Hollywood roles include his portrayal of Dr Allan Grant in the Jurassic Park films, and as a tough Irish cop in Peaky Blinders.
He also starred in The Hunt for Red October, Event Horizon and The Piano.
He auditioned for the role of James Bond in the 1980s at the insistence of a pushy agent but was reluctant to pursue it, concerned appearing as 007 would typecast him.
His Australian body of work includes The Dish, with filming to begin soon on the TV adaptation of Apples Never Fall, based on Liane Moriarty's bestselling novel.