The cause of death was mostly old age: Whitman’s lungs had collapsed, although he had suffered health problems for several years since his stroke in 1873.
This was the man, who, as he says in Song of Myself,

I too am not a bit tamed, I too am untranslatable.
I sound my barbaric yawp over the roofs of the world.
The song of myself begins with “I,” but it ends with “you.”