Locke got off the island but Walt kept appearing, saying he had work to do. Wouldn't that drive you to suicide, too? So Locke hung himself by the neck, and while he was hanging he sawed off his own legs. That's why the coffin is so small."
Stupid stupid stupid. Everyone knows you're supposed to wait until you're already IN the coffin before you break out the saw!