If someone is called a "dirty dog," the person speaking is using an English idiom insinuating that the person being described cannot be trusted. This phrase is usually prefaced by some sort of description of the ways in which the person in question has practiced unscrupulous behavior. There is also an alternative usage of this phrase which allows it to be used as a sort of salute to someone who is particularly crafty and sly. The phrase "dirty dog" was first used in the early part of the 20th century and gains its expressiveness from the idea of comparing a person to a filthy canine.
Idioms are colorful expressions that prevent speech patterns from becoming too predictable or mundane. These idioms, which are generally short phrases whose meanings are far different than the literal definitions of the words within them, can add color and expressiveness to speech. Many of these idioms come courtesy of the animal kingdom, since animals have distinct and colorful behavioral patterns. One of the most enduring animal idioms is used every time someone calls someone else a "dirty dog."
In most instances, this idiomatic expression takes on a negative meaning. It implies that the person described in this manner has done something underhanded or has managed to manipulate a situation to his or advantage by somewhat shady means. As a result, the speaker who uses this phrase is letting the person know that the conniving and scheming have not gone unnoticed. For example, someone might say, "That dirty dog managed to sneak behind my back to the boss and lie about where I was on my day off."
There are certain occasions when the phrase can signal the speaker's praise of the person who merits the phrase. This usually occurs when the speaker has a bit of admiration for the resourcefulness and ingenuity of the person he or she is describing. In this context, it is often used as a way to praise someone's unlikely or unexpected romantic conquest. As an example, a person might say, "You dirty dog; I can't believe you got a date with that beautiful woman."
The earliest printed version of this phrase can be traced back to the 1920s. It's hard to say how it evolved into a compliment in some situations, but it's easy to see how it came to be used as a putdown. After all, an actual dirty dog brings to mind all kinds of unsavory images and smells, so anyone described in this manner must be doing something sneaky.