A Shar-Pei crossbreed called Kai was left tied to railings with a suitcase holding food, a dog bowl, a pillow and his toys.
The Scottish SPCA is trying to trace Kai's owners who abandoned him outside Ayr station on Friday.
The pet charity discovered that the dog was sold on the Gumtree website in 2013, but failed to find out the address of the person who purchased him.
Inspector Stewart Taylor told Sky News: "The dog is microchipped and we were able to find out his name is Kai.
"We contacted the owner registered to the microchip, who stated they had sold Kai on Gumtree in 2013. Unfortunately they could not tell us the address of the person who bought him.
"This case highlights the potential consequences of selling an animal online as it often leads to the impulse buying of pets that people know very little about.
"Regardless of the fact Kai was left with his belongings, this was still a cruel incident and we are keen to identify the person responsible."
He added: "If anyone can help we would ask them to get in touch as soon as possible.
"Kai is around two to three years old and is a lovely dog with a nice nature. We will look after him until we can find him a permanent and loving home."
The three-year-old hound is being looked after at the Scottish SPCA's centre in Glasgow.
The charity stated that abandoning an animal is an offence under the Animal Health and Welfare (Scotland) Act 2006. People found guilty can be banned from keeping animals for life.
There are more than 110,000 stray or abandoned dogs in the UK, with 21 dogs a day being put down by local authorities every year, according to research.