A thrilling book that enthralls you is, by the word's own logic, enslaving you. The verb is built from en-, "to put in," and thrall, the Norse word for a slave.
Thrall reached English from Old Norse þræll. It entered late Old English as þræl, alongside the native word þeow. Merriam-Webster notes that the Norse word is probably related to an Old High German word for "servant."
In the Viking world a thrall stood at the bottom of a three-tier order of jarl, karl and thrall. People could fall into that status in several ways. Children of thralls inherited it. War captives became thralls if nobody ransomed them. A crime could be punished with enslavement, and a free person crushed by poverty or debt could choose it.
Freedom was possible. A master could free a thrall at any time or in a will, and some thralls bought their own release. The freedman, called a leysingi, still owed loyalty to his former master, and shedding that tie took at least two generations. The institution faded across Scandinavia in the 12th and 13th centuries, and Sweden's last remaining county abolished it in 1335.
The verb came later. Merriam-Webster traces it to Middle English enthrallen, "to hold in thrall," and dates its first known use to the 15th century, in the literal sense of enslaving someone. Dictionary.com records it from 1570-80. By the 16th century it was also used figuratively, for mental or moral bondage. Merriam-Webster points to an example in a translation by Thomas Newton, warning a man not to "enthrall his credit and honour to Harlots."
From mental bondage it was a short step to the modern sense of captivating or charming. Today the slavery has dropped out entirely, and being enthralled is a compliment.
English has done this more than once. Captivate first meant to take someone captive, and entrance meant to put someone into a trance. Each began with loss of control and ended as praise.