The background on how Zeff lost his leg differs between anime and manga. In the manga, he severed it with a rock and ate it to survive.
In the anime, he lost it during the ship wreck in an attempt to save Sanji. Zeff’s leg got caught in the wreckage and he tied the metal chain of a ship’s anchor around it, causing the leg to be ripped off when the ship was thrown around by the tides and the chain tightened.
As Oda confimed, the change was due to censorship, as it was considered too much of a shock for young children.
Question: “When I watched the One Piece anime, at the same part of Volume 7, Chapter 57, “Dreams Have a Reason” it says the reason Zeff lost his leg got torn off in the shipwreck… did they change that in consideration of the young children watching the show?”
Oda: “Yes. Hearing “eat your own leg” in that episode would be too much of a shock for young children. When you consider that a medium such as television has tens of millions of viewers, to neglect such a consideration would be a terrible mistake. It’s amazing that all those animators can continue to create such wonderful shows while still thinking about these things all the time!! If you can feel the love when you watch the show, everyone please send fan letters to Toei Animation. It’ll cheer everyone up there.”
Src: opfanpage.com