The narrator of the story has two black cats. He hangs the first one, Pluto, and that night his house burns down, presumably taking the body of the cat with it. The second black cat, much like Pluto, becomes a favorite of his wife, who up until this point has been superstitiously leery of black cats, thinking them witches in disguise.
After he murders his wife, the narrator is determined to kill this cat, but the cat disappears. The narrator is deeply relieved to be rid of what he believes is an evil creature. He walls his wife up and feels he is now safe from the torments that have been plaguing him.
However, he finds out too late that he mistakenly walled up the second cat with his wife. When it meows loudly, the police find it sitting on the head of the wife's decomposing corpse, thus exposing the narrator as a murderer.
It is important to point out that the narrator never made a conscious decision to do anything with the body of the second black cat, as he never killed it. The cat was alive the last time he saw it, and he believed it had disappeared forever. It was a mistake, not a decision, that lead to the cat being walled up with the corpse. It is possible that the narrator did this because, subconsciously, he wanted to be exposed, but the cat was not walled up consciously.