This story is a lot like The Tell-Tale Heart in that the murderer’s own neurotic obsession with hiding his guilt only makes it more ostensible. Of course The Imp of the Perverse includes a lot more contemplation on the psychological impulse to do wrong “merely because we feel that we should not.”
Now, I’ve never considered murder just because I now I shouldn’t, but the psychological theory has some validity on a smaller scale. Junk food, for instance, is all the more irresistible the harder one tries to resist it. It’s like a Chinese finger torture of the mind.
Perhaps Poe, being in a more Biblically-literate society, wrote The Imp of the Perverse with Romans 7:15-20 in mind:
"For I do not understand my own actions. For I do not do what I want, but I do the very thing I hate. Now if I do what I do not want, I agree with the law, that it is good. So now it is no longer I who do it, but sin that dwells within me. For I know that nothing good dwells in me, that is, in my flesh. For I have the desire to do what is right, but not the ability to carry it out. For I do not do the good I want, but the evil I do not want is what I keep on doing. Now if I do what I do not want, it is no longer I who do it, but sin that dwells within me."
(English Standard Version)
Certainly this similarity would not have been lost on the 19th century readership, especially since Poe’s audience was primarily comprised of women, who were seen as the moral and religious centers of society.