The dog, named Eric by veterinary staff, was so emaciated his ribs were poking through his fur, and he could not stand or lift his head.
Eric's claws were so overgrown they curled over and the RSPCA said the bull breed cross was 'at death's door'.
But now Eric, who has been renamed Walter, has made a 'remarkable recovery, weighing a healthy 20kg.
Walter was found languishing in the garden of an empty house in Accrington, Lancashire, by a member of the public on Saturday, March 2.
Inspector Nina Small, from RSPCA Lancashire East, took him to the vet, where he collapsed.
But now, five months later, after round-the-clock care, Walter is the picture of health following a stint in foster care.
Ms Small said: "He's the thinnest dog I've ever seen alive. All of the bones in his body were visible, he was covered in urine and his nails were overgrown.
"His faeces had pieces of glass and metal as big as a 50 pence piece in it, and bits of batteries.
"I believe poor Walter had been confined somewhere out of sight, eating whatever he's been able to get in his mouth - perhaps a garage or a shed.
"We're still investigating this case but are thrilled that he's now back to a healthy weight and full strength so that we can find him a wonderful new home."
Nina added: "Walter is a sweet-natured, friendly boy who loves life, people and food.
"He has a wonderful, energetic personality and lots of character. He loves taking long naps cuddled up next to you."