I tried to prepare for this one by doing a lot of research. But a) a lot of the research contradicts itself, and b) the main point of this rant, as it is with all the ones on characterization, is not sociopathy. It’s writing characters whom the writer thinks of as sociopathic.

1) You can play with a lot of the terms under the surface.

Here comes the vocabulary divide. If you’re writing an urban fantasy or one in which the scientists are getting or have gotten around to classifying mental disorders (a Victorian fantasy that concentrated on things like “bicycle face” and “sexual inversion” would be wonderful, though there’s no way it would be able to compete with the sheer amount of historical batshit), then “sociopath” is not going to come out of the blue. But in another world, where there is no similar history of studying and giving names to mental disorders, much less a hint of a similar classification scheme that would wind up with the term “sociopath?” Please. Why would these characters be thinking of another person that way? They wouldn’t. So stop it.
But that doesn’t mean that you can’t do research on sociopathy—the kind on which I skimped—and then have a character act in accordance with what you learned. The reader may draw the conclusion that he’s a textbook case of such a disorder. The characters are not going to. They’ll explain him in their own way. Perhaps such a person is possessed by demons, is under the curse of an evil god, is the son of a bad family, or took in amoral tendencies by breathing too much pollen. There. Now you’ve been true to your own world while still writing the kind of character you want to write.
By the by, I would not advise hinting at these traits through long speeches in which one character basically spouts a slightly reworded diagnosis. That drives the point home too hard, and prizes our own world’s definitions above the created one’s—especially if, as I pointed out, this world has no reason to be thinking in the terms of Western science. And quite a few fantasy worlds don’t.
Show the traits instead. Methods for doing so are what the rest of this rant is about.

2) Morality/amorality/immorality.

The first of these is what most authors portray, and so it’s probably no surprise that the methods of doing it are well-known—reassurances from other characters, declarations of moral laws that the protagonists are then shown acting in accord with, characters’ self-explanations and self-justifications, hunches that later turn out to have been right, and many, many others. It’s even easy to portray shades of morality, because when authors depart from it, they know what standard they’re departing from.
Immorality and amorality are harder, even when the author means with all her heart and soul to write a sociopath. We aren’t as used to them, and in particular, we aren’t as used to having characters think that way. The danger here is not that readers might interpret the character’s actions differently—of course that’s going to happen—but that the author will mess up, because she hasn’t fixed clearly in her head what the character’s guiding code is.
Immorality? All right, the character knows what’s right and what’s wrong, and doesn’t give a shit about it; he may even exult in acting in defiance of all known moral codes. Or he may use the deficiencies in existing morals to justify himself. Or he may adopt the morals of a gang or a cult or another group where he knows that, although “wrong” in the larger society, he is “right.” But in any case of immorality, you’ve set yourself the challenge of having a character who abides by that in his thoughts and self-justifications and self-explanations. He might pretend to be moral to gain an advantage. But it makes zero sense if the character, in his head where no one can hear, despises morals at one point in the story and admires them at another, unless he’s deceiving himself and/or is not really a sociopath. In fact, the moment an “immoral” character expresses admiration for one of the heroes, I peg him as the guy who’s going to turn out to be the traitor to the dark side in the end. Those paths are also well-worn. If you don’t mean to write a character that turns out moral, refrain from treading them, please.
Amorality? All right, without morals, outside good and evil. The character may not know what right and wrong are, may not be able to distinguish them, may guide himself entirely by practicalities (what feels good, what doesn’t feel good, what will allow him to survive in a certain situation), may not understand moral reasoning, may not have been exposed to the kind of training that would let him understand what “right” and “wrong” are to other people. To get an idea of it, I would classify not just certain sociopathic characters but also feral children characters as amoral.
This, I think, is definitely harder to portray. At least an immoral character might act directly against society’s compass because he wants to spite it. But the amoral character’s justifications have to come from elsewhere. If he’s a sociopath and you also want him to be a murderer, but an amoral one…well, why? Why commit the murder? It might please him, but why? It might be necessary to survival, but why? And you can’t fall back on spiting moral justifications, not when you’re outside their compass.
As you can probably tell, I’m fascinated by the possibilities of portraying someone amoral, but I also don’t believe I’ve seen many good portraits. Most authors will fall back on “he knows he’s evil” or “he’d like to be good” sooner or later. That’s fine; you don’t have to pick amorality. But whichever one you pick, know its definition, and stick to it good and hard.

3) Balance manipulation with lack of empathy.

Many sociopaths I’ve read about are master manipulators—because they don’t care about the people around them, and are therefore able to use them for their own ends without remorse. But many of the sociopaths I’ve read about are also extremely limited in empathy—they get to be destroyed when the heroine proves that she understands them while they don’t understand her.
Um, ‘scuse me, wouldn’t the best manipulator be someone who did understand emotions? Then he could use people by other means than just lying to them or persuading them of the rationality of his arguments; he could hook them good and hard and drag them along by the guts. He could lead by charisma. He could anticipate his enemies’ actions before they performed them. And if he happened to enjoy pain (he doesn’t have to, see point 5), then inflicting emotional pain would be on the list, too, as opposed to just physical and sexual.
My point is that it would be neat to balance these. Saying “I want my character to be a sociopath” does not necessarily guarantee that he has to be manipulative, and it does not necessarily guarantee that he has to lack empathy, and it does not necessarily guarantee that he has to have both traits. But I do think that manipulation has a lot more in common with the emotions than most people realize. And a villain who understands the hero is a terrifying one. (My new favorite villain-hero scene is from Jim Butcher’s Death Masks, where the villain Nicodemus has the hero, Harry Dresden, tied up and is doing a calm and very plausible-sounding psychoanalysis of him).

4) Sociopath != badass.

A lot of real-life sociopaths are losers. L-O-S-E-R-S. They drift along on the fringes of society, go to jail, lead lives that while dangerous are hardly glamorous and romantic, live in poverty, endure and give abuse, and make mistakes in matters of social conduct that weird other people out and cause them to distance themselves from them, even if they never commit a murder or a rape. This idea that any sociopathic character is immediately going to be a charismatic, highly manipulative, highly skilled leader is true in many fantasies. That does not mean that any sociopath you make has to be that way.
More than anything else, I think this come from how scary people find the thought of real live sociopathy, so of course in a fictional context he immediately shoots to the top as the big bad villain. It’s also an unfortunate product of the idea that anyone who doesn’t care about what the rest of society does is ohmygod cool. A lot of fantasy heroes have a touch of the same thing, with a devil-may-care attitude or a maverick political career. That could be interesting if the author bothers to justify how they’ve managed to survive in an environment like the army or the nobility, or to show how the sociopath worked his way up. It’s not interesting when the author just flings a few of the more typical traits on the sociopath character (see point 5, again) and then looks expectantly at the reader, demanding that she be scared now.
I’m not scared. I’m not scared even if the author tells me that the sociopath committed murder and did it with a smile on his face. “Show, not tell” has never been more true. Show me why this person is a threat to the hero and not some nameless bum on a street somewhere. It’s not his personality traits alone that made him climb to the top; in the best stories, it will also be rooted in the society, in the attitudes of people around him, and in the circumstances he’s passed through in life.

5) You can always avoid the obvious signs, you know.

Among these are torture of little baby animals (Peter Wiggin, Ender’s Game), sadism (Darken Rahl, Wizard’s First Rule), pedophilia (hell, pick a villain), a liking for public sex (Ademar, A Song for Arbonne), punishing servants randomly (the Forsaken, the Wheel of Time), and a great many other “perversions” that always seem to involve physical violence, sex, or both at once. It’s gotten to the point that I expect the author to include something like that if she wants to tell me the villain’s a sociopath. It’s also gotten to the point where I think traits like this are often just plot coupons of the author’s own, not reinforced or supported. They’re dumped in, and after the initial revulsion of “Ewww, he tortures baby squirrels!” we’re just supposed to accept that now we know how to read this character, in the same way that we know that finding the Mystical Sword of Escobar means that the protagonist will inherit the throne.
Can we skip these? If you’re not going to reinforce them and show them as part of a consistent personality, rather than in isolation, there’s no point to them. I’d rather see emotional violence at this point, myself. I’d rather see characters committing the right actions for the wrong reasons, and being able to shudder at the view from inside this person’s head. I’d rather see characters actually acting out their Machiavellian plots, instead of the author just telling me “Oh, they’re there” in between having the sociopath rape children. I’d rather see the sociopath dealing out violence to the people in his path, not characters the author has picked to mash my emotional buttons.
It sounds horrible to say it, but I’ve gotten used to lavishly described murder and rape and torture in fantasy novels. The most affecting scenes for me are the ones where the author cuts out one or the other of the traits that’s jaded me—either she’s spare in her description, or the horror is something other than murder or rape or torture. Come on. If you’ve got a clever sociopath operating outside the rules, you ought to be able to come up with other wrong things for him to do.

6) This is a great arena for personality-dominated stories.

I dislike the term, because I think it’s awkward, but I can’t come up with a better one. “Personality-dominated” stories (damnit) is the kind of story where the viewpoint character’s personality completely and totally controls and defines the narration. The story might be humorous coming from anyone else’s mouth, but you’ve got a well-defined and somber character telling it, so it’s not. The natural narrative focus might be the enormous changes the character undergoes, but because he cares about his children instead, he shows casual acceptance of those changes. Or the story might “naturally” be horrible, with the viewpoint character nowhere near a hero, but because she’s the one telling it, it becomes fun and light-hearted, and you only see the horror when you step back a bit.
Imagine a sociopath, a well-defined, well-characterized sociopath, telling the whole story. It’s pretty uncommon. For the most part, authors show sociopaths as the villains, so it’s never their story, but the heroes’. Or else the author leavens them with enough of the “badass” vibe to make it clear that we’re supposed to admire this person a bit, because, goodness, isn’t it all terribly exciting? And maybe they had a bad childhood, to boot. The mindfuck isn’t present. We know where the author stands.
But if you do go inside the sociopath’s head with no untidy flinching, then you might remove the little pane of glass that usually prevents readers from seeing such a character as the hero. Absorb your own self in the character. Give up your own principles for the character’s perversion of them or lack of them, as long as the story lasts. Make a reader fall with you. Make it intense enough, and the reader might not even notice the sociopathy until later.
Isn’t it fun? This is the kind of story I would willingly, even eagerly, read a sociopath in, because it’s working with the character’s strengths instead of trying to use the double standard of having them and then just confining them when it’s time (such as having the superintelligent sociopathic villain get fooled by a string of silly coincidences).

7) Make it a reason, not an excuse.

Just a short note, really, because I’m sure that you’re all aware of this.
Insanity in villains is way the fuck overplayed. And if you look at it from the right light, sociopathy is a form of insanity. It’s just one that’s a lot scarier (and therefore, in some ways, more attractive) to most authors than the kind where the character gibbers in the corner with his underpants on his head.
And so, the force of every other point in the rant pours onto this. Show, don’t tell. Show the consequences of the villain’s sociopathy affecting other people. Don’t push the usual signs at the reader and just wait for her to accept them. Show how he achieved the position he did. Make sure that your “usual sociopathic traits” don’t contradict each other. Make it clear where your character stands on morality. Above all, don’t make this character just “a sociopath” and nothing more; that is just making the character into another stock type.
There actually aren’t a lot of convincing sociopathic villains in fantasy books, I think. It’s much easier to find them in real life.