In Stanley Coren's book, 'How Dogs Think', he says:
Plato's contemporary Diogenes, another significant Greek philosopher, although more eccentric than most, became known for wandering the world with a lamp claiming to be "looking for an honest man." While he had his doubts about humans, Diogenes thought dogs were extremely moral and adopted the nickname "Cyon", which means "Dog". He would go on to found one of the great ancient schools of philosophy, and he and his followers would become known by his nickname as "Cynics" or "Dog Thinkers." Diogenes' own intelligence and wit were such that Alexander the Great, after meeting him in Corinth, went away saying, "If I were not Alexander, I should wish to be Diogenes."Coren presents this information as part of a discussion of humanity's changing attitudes over time to the question of the dog's intelligence and ability to feel emotion. In Coren's version, Diogenes adopted the name out of respect for the dog.
When Diogenes died, the people of Athens raised a great marble pillar in his memory. On top of the pillar was the image of a dog. Beneath the dog there was a long inscription that started with the following bit of conversation:
"Say, Dog, I pray, what guard you in that tomb?'
The Internet Encyclopedia of Philosopy, on the other hand, says
the term may have begun as an insult referring to Diogenes’ style of life, especially his proclivity to perform all of his activities in public. Shamelessness, which allowed Diogenes to use any space for any purpose, was primary in the invention of “Diogenes the Dog.”
The precise source of the term “Cynic” is, however, less important than the wholehearted appropriation of it. The first Cynics, beginning most clearly with Diogenes of Sinope, embraced their title: they barked at those who displeased them, spurned Athenian etiquette, and lived from nature. In other words, what may have originated as a disparaging label became the designation of a philosophical vocation.