You're likely thinking of The Pagemaster (1994).
A boy named Richard Tyler, who is afraid of reading, enters a magical world inside a library and transforms into an animated character for adventures through various literary genres—horror, adventure, fantasy—guided by three anthropomorphic books.
While other films feature kids turning into animals or cartoons, this is the most iconic match for a boy entering an animated library world.