The book with the most pages in history is generally considered to be “À la recherche du temps perdu” (In Search of Lost Time) by Marcel Proust, which holds the Guinness World Record for the longest novel ever published. In its standard French edition, it contains over 9.6 million characters, which translates to roughly 3,000–4,000 pages, depending on formatting.
However, if we consider non-fiction or religious compilations, some books—like the Yongle Dadian, an ancient Chinese encyclopedia—technically have more pages (over 11,000 volumes) but are considered reference works, not single-volume books or novels.