The New York City Public Library, GhostbustersThe Ghostbusters get their first official call to capture The Grey Lady, the ghost of a librarian named Eleanor Twitty. At first, she's fairly harmless, stacking books in odd places (which doesn't make for a very good organizational system, if you ask me), but she gets much scarier. The moral of the story is: don't interrupt a librarian when they are trying to read.
Bonus: The amazing recreation of the Ghostbusters catching ghosts at the library by Improv is Everywhere, which you can see here.
The Hogwarts Library, Harry PotterI mean, of course the library at Hogwarts is haunted - the school itself has several ghosts in addition to Peeves the Poltergeist - but it's more than that. In addition to the absolute terror that is Madame Pince (seriously, J.K. Rowling actually apologized for making her a mean and positively crummy librarian), the Hogwarts Library is home to the Restricted Section, home of books that will literally howl at you when you open them. If The Monster Book of Monsters is considered safe enough to be required reading, we can only imagine what hides on those dusty shelves!
Sunnydale High School Library, Buffy the Vampire SlayerAs if vampire hunting wasn't enough work, poor Buffy had to also go to high school. The library there held some useful titles for monster hunting, but it also happened to be located directly over the Hellmouth, where various beasties could appear right through the floor at any time. No peaceful studying in this library! Luckily, it also has a ton of weapons, just in case.
Clayr's Library, LiraelIn Lirael by Garth Nix, the title character finds herself working in an exceptionally dangerous library. The library houses not only books, but also prophecies, artifacts, weapons, and armor. It also acts as a prison to at least one elemental demon, and every employee gets a magic-infused dagger as part of their uniform, to be carried around like I carry the keys to the craft cabinets.
The Library, Doctor WhoSure, the planet-sized library that appeared in Doctor Who for "Silence in the Library" and "Forest of the Dead" seemed lovely - SO many books! - but it was also taken over by shadow-like creatures called the Vashta Nerada that could strip a person down to their bones. Oh, and there's a catalog of human souls.
Unseen University Library, DiscworldThe Discworld series by Terry Pratchett is home to Unseen University, which itself is home to the Unseen University Library, in which the librarian just so happens to have turned into an orangutan. The shelves are quite literally endless, and even those who have been there many times would find it a good idea to leave some string to help them get back out again. Some expeditions into the stacks have gotten so lost that they had to eat their own shoes to survive.
Night Vale Public Library, Welcome to Night ValeIn the Welcome to Night Vale podcast, the library is an extremely unsafe place to be. All the librarians are malevolent men named Randall, and there are no entrances to the library - one simply finds oneself wandering the shelves until the awaken in a sweaty panic, back in their own beds.
Back in 1993, "an unchecked librarian population resulted in the loss of many innocent and screaming book lovers," and patrons are warned to stay away, making themselves as big as possible if they happen to catch a librarian's eye.