The Librarian first appeared in the second novel of the series, The Light Fantastic, in which he was transformed into an orangutan as a side-effect of a powerful magic spell. Discovering that being an orangutan has certain advantages for a librarian (such as not requiring a ladder to reach those tricky high-up shelves), he refused to be transformed back into a human, and has remained an orangutan ever since. The other wizards have gradually become used to the situation, to the extent that "if someone ever reported that there was an orangutan in the Library, the wizards would probably go and ask the Librarian if he'd seen it." (Night Watch)
The Librarian is known for his violent reaction whenever he hears anyone refer to him as a "monkey". (An orangutan is an ape.)
The Librarian's actual name has never been given in any of the novels; he is always simply "the Librarian". The Discworld Companion hints that he may once have been Dr Horace Worblehat, which goes a long way to explaining why he's happier as an orangutan than as a human.