BBB Etymology - Kick the bucket
In addition to the familiar meaning that it retains, a bucket was a beam from which things could be hung, including slaughtered pigs strung up by their hind legs to bleed after their throats had been cut or to facilitate butchery. In struggling vainly, they would kick the bucket and this (probably) led to the slang expression.