The former Scotland and Watsonians centre revealed the news in a post on social media on Saturday.
The 57-year-old thanked his followers for their messages of support and published pictures of himself after chemotherapy.
He said: “Thanks for all your supportive messages that are helping me get through my chemo for Non Hodgkin’s Lymphoma. I am half-way through treatment which is going well apart from hair!”
Hastings was treated for Non Hodgkin lymphoma several years ago when he underwent radiotherapy and chemotherapy.
It is a type of cancer that develops in the lymphatic system, a network of vessels and glands spread throughout your body, and affects your immune system.
Capped 65 times by Scotland, Hastings twice toured with the British & Irish Lions, to Australia in 1989 and New Zealand four years later.
He played his club rugby for Watsonians and was a key member of Scotland’s Grand Slam-winning team in 1990, alongside his older brother Gavin. He retired from international rugby in 1997 as Scotland’s most capped player, and remains the most capped centre.
Hastings now commentates on rugby for a number of broadcasters, including BT Sport, Sky Sports, ITV and BBC.
Among those to send messages of support was former Scotland captain Chris Cusiter, who tweeted: “Stay strong Scott. Sending you and the family our love.”
Former England lock Martin Bayfield said: “Keep going Scotty. Sending all our love.”
Another old England adversary, Brian Moore, said simply: “Keep battling mate.”