Paul Flockhart, 46, and his Staffie dog Roxy have gained a legion of fans in the years that they have been living on the streets.
But Paul, from Kirckcaldy, Fife, was dealt a devastating blow after noticing a swelling on Roxy’s side.
The pair have been regularly seen just off the town’s High Street since 2010.
And Roxy, who never forgets people who give her biscuits, has become a hit with local residents.
But a vet diagnosed Roxy with an enlarged spleen and said that surgery could not be recommended for her.
Paul said: “The vet said there were also spots on her liver, which I took to mean cancer.
“I was told that she had about a month and that’s been five weeks now. She seems to have perked up this last week but whether that’s just a last rally, I don’t know.”
Paul inherited Roxy from a friend in 2010 when she was just a one-year-old.
He added: “Everybody loves her and she’s always on the lookout for anyone coming who she knows has a biscuit for her.
“Every day is like Christmas Day for Roxy. I won’t let her suffer and I’ll know when it’s time to let her go.”
Local resident Grace Studders was so moved by Roxy’s plight that she set up an online fundraiser to raise money for Roxy’s final treatments.
She said: “To my mind Paul is a gentleman who has fallen on hard times and his wee dog Roxy is always by his side.
“The two of them have become everyone’s favourite and stop to chat and give Paul a cuppa and Roxy a cake or biscuits.”
Residents have raised more than £850 so far in order for Roxy to have her final assessment and treatment.
Grace confirmed that Paul had not asked for financial help and that any surplus donations would be donated to animal charities.
“We all want what’s best for our pets, and it’s wonderful to hear of benevolent people like Grace who want to help in cases like these.”