Because of the way in which the murderer is presented as an unreliable narrator, lots of uncertainty exists about his character and the astute reader must infer lots of the information we can glean about him. However, if we look at the ending, we can suggest the two following traits that are responsible for the narrator's downfall.
Firstly, it is clear that the narrator takes pride in the way he has committed what appears to him to be the "perfect" murder. He says that there was no blood at all, because he "had been to wary for that. A tub had caught all--ha! ha!" His arrogance and the way he gloats at his intelligence leads him to talk to the men and position himself right above the body:
I brought chairs into the room, and desired them here to rest from their fatigues, while I myself, in the wild audacity of my perfect triumph, placed my own seat upon the very spot beneath which reposed the corpse of the victim.
It is clear that this belief in his own "perfect triumph" and the narrator's arrogance is thus one key trait that leads to his discovery and capture.
Secondly, although this is not made clear, I believe that the sound of the beating of the old man's heart actually symbolises the internal guilt of the narrator in committing the crime that he is apparently so unaffected by. It is obvious that the sound of this beating is heard by the narrator alone, and what is interesting to spot is the way that this sound has the effect of driving the narrator into a kind of lunacy:
I foamed--I raved--I swore! I swung the chair upon which I had been sitting, and grated it upon the boards, but the noise arose over all and continually increased. It grew louder--louder--louder!
Perhaps we can read this as being the conscience of the narrator demanding to be heard. Thus we could say that it is the guilt of the narrator that secondly is responsible for his downfall.
1. Pride. He thinks he is smart enough to get away with murder. Pride, or hubris, is the traditional flaw of a tragic hero. The narrator of TTH is certainly not that. He could be considered an anti-hero, or Byronic Hero, which is a character that has antagonistic qualities that you end up liking anyway. The Joker and Darth Vader are two good examples of this.
2. Guilt. This is what really does him in. He is so riddled with guilt over his actions that he hallucinates the beating of the heart under the floor boards. If you were to ask him if he actually felt guilty, he would probably say no, and he doesn't seem to show remorse, as such. The psychological answer would be that he has buried the guilt in his subconsciousness and that the beating heart is the physical expression of this suppressed emotion.