There are many public libraries in Beijing that can borrow books, basically in every district; Its collection of books is the first in the National Library. If you borrow books from the public library, the fee is very low and the procedure is very convenient. Just bring your ID card and get a card.
Beijing Book Building sells books, but of course it doesn't provide book lending service.