Goram revealed in an interview with the Daily Record he has stage four oesophageal cancer.
The 58-year-old - who also had a loan spell with Manchester United in 2001 - has said he will "fight like I've never fought before."
"I'll be here as long as I possibly can," he said. "I'll fight like I've never fought before. The only difference is the time bomb ticking away.
"I thought I had severe indigestion. It was as though my gullet was blocked. After a few weeks, it got worse and nothing was getting through.
"Everything I ate or drank didn't get halfway to my stomach and I threw it back up. I couldn't get a face-to-face with my GP for two weeks, by which time I was in total agony. I'd also lost four stone in four weeks.
"I had a CT scan at Monklands, then was rushed to Wishaw General and told my next of kin should be with me. That is when the alarm bells started ringing. I realised I had cancer."
During a seven-year spell with Rangers, Goram won five league titles, three Scottish Cups and two Scottish League Cups.
He also made 43 appearances for Scotland, and was selected for the 1986 and 1990 World Cups, as well the Euro 1992 and 1996.
Goram said he has been told he has been given an estimation of six months to live, and has turned down chemotherapy.
"The specialist said if I take the chemotherapy, I've an average of nine months to go – an average," he said. "If I don't take the chemo, I have an average of six.
"Take chemotherapy and be in agony for the sake of an extra three months and zero quality of life? No thanks. Chemotherapy is off the menu."