Iain Banks, 59, posted a message on his official website saying his next novel The Quarry, due to be published later this year, would be his last.
The writer’s novels include The Wasp Factory, The Crow Road, Complicity and the Culture series.
The statement said Iain Banks’ health problems came to light when he saw his doctor, suffering from a sore back.
Iain Banks was diagnosed with jaundice, before further tests established the full extent of his illness.
The writer said in the same statement that he had asked his partner Adele to marry him and was now on a short honeymoon.
Iain Banks, who lives in North Queensferry, Fife, said he had cancelled all future public engagements.
“The bottom line now, I’m afraid, is that as a late-stage gall bladder cancer patient, I’m expected to live for ‘several months’ and it’s extremely unlikely I’ll live beyond a year.
“So it looks like my latest novel, The Quarry, will be my last.”
The author said the disease had spread to both lobes of his liver, and possibly his pancreas and lymph nodes.
Iain Banks added that there was little chance of surgeons being able to remove the tumors because of how far they had spread.
He has asked his publishers to bring forward the publication of his new book to “give me a better chance of being around when it hits the shelves.”
Born in Fife, Iain Menzies Banks studied at Stirling University before publishing his first novel, The Wasp Factory, in 1984.
He has alternated between mainstream and science fiction novels, which he wrote under the name Iain M. Banks.
In 2008, Iain Banks was named one of the 50 greatest British writers since 1945 in a list compiled by The Times.
News of his illness was described as “terribly sad” by First Minister Alex Salmond.
A website, called Banksophilia, has been created for friends and fans to leave messages for Iain Banks.
Edinburgh Book Festival tweeted: “Such sad news. Iain Banks our thoughts are with you and your loved ones.”
The Scottish Book Trust added: “We’re all shocked and saddened by Iain Banks’ news. We send our best wishes to him, his family and friends.”
The US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…