"And each separate dying ember wrought its ghost upon the floor."
This metaphor is the same idea as the idiom "giving up the ghost." The death of the embers is like a person dying and the spirit, or ghost, remaining. In this poem by Poe, the narrator is at home in a cozy room with a fire. He is dozing and realizes the fire is dying down and the sparks, or embers, are going out on the floor. This metaphor is giving the reader a sense of the setting for the poem. To set the mood, Poe uses mysterious and depressing words in these descriptions: “bleak,” “dying,” and “ghost.” We can imagine the cold December night and the narrator sitting by a warm fire, lightly sleeping. The narrator goes on to tell us he has been reading and wishing for daylight. He is trying to find peace from his memories of Lenore:
"Eagerly I wished the morrow;—vainly I had sought to borrow
From my books surcease of sorrow—sorrow for the lost Lenore"