Look through the pages of the books to see if any are damp. Spread damp papers to dry, or if the books are moist, carefully turn them upside down and fan out the pages. Let them dry for a couple days in a dry location. You can sprinkle some cornstarch on the pages to help absorb the moisture.
Use a soft cloth to brush away dry mold. Do this outdoors or into a closeable plastic bag. Also brush off the cornstarch, if applicable.
Place the papers and books into a large plastic bag. A zipped bag in which sheets or a comforter come works well. Alternatively, according to Dartmouth College Library, place the book or pages into a small container, such as a small trashcan. It does not need a lid.
Open a box of baking soda and carefully place it in the sealed bag with books or papers. Kitty litter and charcoal briquettes without lighter fluid also will work. If you placed the books or pages in a small container, place it inside a larger one and put the baking soda or another odor absorbing agent in the larger container. Then, put a lid on the larger container.
Check the books and papers every three to five days. Once the musty odor is gone,, take them out and store them in a dry location. If there still is some odor, repeat the process with another odor-absorbing agent.