She died a miserable death.

Literal

She [topic-は] miserable way-of-dying [object-を] did.

死に方 ('way of dying') uses the ~方 suffix. 悲惨な ('miserable/tragic') is a strong na-adjective.