"Bein" does mean "leg". But a long time ago, it used to mean "bone" and the meaning shifted over time. Still a lot of German names for bones have the word "bein" in it. Like "Schienbein" ("shin"), "Brustbein" ("sternum"), "Nasenbein" ("nasal bone"), and many many others. As does "Elfenbein", literally "elf bone".
There's also "Gebeine", which means "skeletal remains".
Although, now that I read more about the origin of the word, the "Elfen" part did indeed originally refer to elephants. Over time, the meaning was reinterpreted, maybe also because the word for elephant started to take a slightly different standard form ("Elefant").
It originally referred to elephants, but linguistic evolution/drift changed the word for elephant into Elefant while leaving this relic behind in the word for ivory.
for all which are confused about the elfenbeinküste it's not from the word elephant but the big tusks of an elephant which material is called elfenbein which translates to ivory in english, so basically its ivory coast aswell and not elephant leg coast :)
There's also "Gebeine", which means "skeletal remains".