The sparse blues track references the coronavirus crisis, with Sir Mick Jagger singing: "Life was so beautiful, now we all got locked down / Feel like a ghost, living in a ghost town."
In a statement, the band said the track was initially recorded a year ago in LA but was "finished in lockdown".
"We thought would resonate through the times we're living in," Sir Mick said.
Speaking to Apple Music, the singer revealed the track had been written "in 10 minutes" during a jam session last February.
"It wasn't written for now but it was written about being in a place which was full of life, and then now that's all bereft of life, so to speak," he told Zane Lowe.
"And when I went back to what I'd written originally lyrically, it was all full of plague terms and things like that.
"Keith Richards and I both had the idea that we should release it. But I said, 'Well I've got to rewrite it - some of it is not going to work and some of it was a bit weird and a bit too dark'."
Richards said the song had been completed "via satellite" before being released on Thursday.
"It's sort of eerie when suddenly it's coming to life," he said. "We sort of did it from outer space. But I actually liked the way it turned out.
'I'm very hard on myself'
Living In A Ghost Town is the first original song the band have released since two new tracks - Doom and Gloom and One More Shot - featured on their 2012 Greatest Hits album Grrr!
Before that, their last album of new material was 2005's A Bigger Bang.
"Yeah, it was so long," Sir Mick told Apple. "And I think one of the problems I personally have with it is that it's suddenly that you want it to be really good.
"So I don't just want it to be a good album, I want it to be great. You know? Yes, I'm very hard on myself. If I write something or if I write something with Keith Richards or whatever, it's going to be great. It can't just be good."
The singer said he hoped to finish more tracks while in isolation, but added: "there's obviously no substitute for being together".
He also acknowledged it was hard to say when the band would be able to resume their world tour, which was postponed due to the Covid-19 pandemic.
"The whole touring thing, we don't know what's going to be happening," he said. "We don't know when there's going to be the next football match. We don't know when the next tour outside's going to be.
"You would imagine that playing outside would be more healthy than playing inside, but you don't know... This is all in the realm of conjecture."
The Stones were last seen on the One World: Together At Home concert last weekend, playing together from four separate locations - although drummer Charlie Watts did not appear to have a drum kit in his house.
Instead, he banged on flight cases and the arm of a sofa for their rendition of You Can't Always Get What You Want.
Reflecting on the current situation, Sir Mick said he was "very aware of how lucky I am."
"A lot of people lost their jobs and it's not your fault. It's circumstances completely out of your control. It's not as though I did a bad job or I screwed up on my job and got fired," he said.
"And also the less money you have, the more worries you have. So for lots of people, it's really tough.
"It's been a horrible time for everyone. But some people worse than others."