You are right in identifying that the vast majority of the story is told in a flashback form. The narrator looks back from his present location and situation and tells the story of how he came to be where he is now, and to face the future that he confronts in the present. That location is of course a prison cell, as the narrator reveals in the opening paragraph:
But to-morrow I die, and to-day I would unburthen my soul.
He has clearly been convicted for the murder of his wife, as the rest of the story explains, and now he finds himself in prison the day before he is to be hung for the murder of his wife. It is this imminent death that gives him the desire to record his own story and what happened to him to drive him to kill his wife, and in particular the somewhat uncanny and supernatural events surrounding the black cat that is used to give this story its title.