"The Masque of the Red Death" is in essence a story about the human desire to avoid death and the ultimate futility of such avoidance. Prince Prospero's name recalls both the term for wealth and the Shakespearean magician of "The Tempest" whose duchy was usurped, and he uses his wealth to give up his rule over his land and to flee death by shutting himself away with a thousand of his noblemen. Thus Poe shows him almost immediately to be fatally flawed, as he remains happy and carefree despite the decimation of his kingdom, showing a fundamental disconnect between his emotions and the needs of his people. His happiness does not result from innocence so much as a desperate fear of sadness and death, and the apparent sinfulness of his actions is ironically underlined as he shuts himself into a religious abbey, which Prospero has protected with iron in the hopes of keeping away the consequences of his wrongdoings.
We can easily view the Prince's masquerade ball as an allegory for the inevitable procession of life into death. Prospero's seven rooms seem to represent the seven decades of his life, as the first room is located on the eastern side of the corridor, a direction that has commonly been associated with the sun rising and hence with the beginning of life, and the seventh room is located on the far west side of the corridor, in the direction of death and of the setting sun. Furthermore, the seventh room is clearly associated with death, both through its black color and through the red coloring of the windows, which refer to blood and to the ever-present aura of the Red Death. When faced with the figure of the Red Death, Prospero freezes at first in the first room and then plunges towards the seventh room, where he dies, caught at last by the Red Death.
This excerpt is from the GradeSaver analysis section in the link below. Please read the whole thing.