There seems to be no connection. The book ("liber") derives from what the inner bark of plants was called, while the liberty meaning ("līber") would be the same in latin (unrestricted, free, not slave).
The pronunciation differs between the two words, with a long i in the liberty meaning. I have very small knowledge of the pronunciation, and long/short i doesn't seem to be indicated in the Duolingo course.
Organic material like bark and leaves was easy to write on, so I guess the book meaning would have that connection, using bark to write on. There are some birch bark manuscripts preserved from the 1st century.