The narrator in "The Black Cat," by Poe, mentions the wall to the police because he can no longer hide his black deeds, and he must be punished for those deeds. The foreshadowing for this punishment begins at the start of the story when he hangs Pluto, and the cat's image with a rope around his neck is emblazoned on the wall after the fire. This imagery continues with the white spot on the second black cat's breast that resembles the gallows. From the beginning of the story, the narrator experiences a decline and ascribes his terrible deeds to the use of alcohol though the reader knows that he has truly become an evil character.
He begins by loving Pluto, the first black cat, but, as his temperament alters, he finds himself in states of rage. First, the narrator takes Pluto's eye out, and later he hangs him. This hanging is the first foreshadowing of the narrator's own fate. Upon getting the second black cat which, ironically, is also missing an eye, his dread and rage at the new cat continue. Ultimately, he kills his wife and unknowingly walls up the live cat with her in the cellar.
The narrator's bravado (ego) leads to his rapping on the wall. However, more importantly, he must pay for his crimes against nature. Thus, the explanation of the imagery of the gallows at the very onset of the story predicts the narrator's own fate and the sin for which he must pay.