I built a library underground, and just a few day ago I went there and 90% of the bookshelves (wood) was gone. My friend said that it was an enderman! Can that be true? How can I protect against it?
Enderman can't move wooden blocks or bookcases assuming you're on the latest version. They have a limited block set. IF you want to protect against Endermen keep the surrounding area bright, but they have a habit of teleporting into bright areas. But as I said, Endermen wouldn't do this.
As noted elsewhere, it's possible lava burned stuff up; if you hear lava inside the library, dig out 2 blocks in everyway from the inside wall of the library and lava shouldn't be able to reach your wodden walls.
If you're playing on a server I'd suspect another player and/or a fire that got out of hand.