Paulo Coelho, author of "The Alchemist," talks to WSJ's Ellen Gamerman about how he connects to his millions of fans on social media, and how they helped inspire his latest novel, "Adultery." Photo: Getty Images.

Not with the author himself and not for any particular reason other than that I'm far from home, it's a Swiss national holiday and "nobody's watching," he says with a smoky laugh. In his penthouse apartment overlooking the lake here, we are discussing his new novel about infidelity. "Tonight you can come to downtown and commit an adultery—it would be appropriate given the subject," he says.

ENLARGE

When Mr. Coelho's novel, "Adultery," comes out Tuesday, the publicity will be handled almost entirely by the 66-year-old writer, a self-styled spiritual guide who has sold more than 165 million books in some 80 languages. (Read an excerpt from the book.) The Brazilian-born author has become an international celebrity due in no small part to his knack for the provocative and his immense social-media following. An early blogger and Facebook poster, he knows how to cast clickbait (breezily endorsing illicit affairs during business trips) and shape his image (later trying to take back the comment, labeling it a "stupid joke").

Mr. Coelho (pronounced "Coe-AIL-yoh") has more than 25.6 million fans on Facebook in three languages and over 9 million followers on Twitter. He has more followers on those platforms than Stephen King, J.K. Rowling, James Patterson, John Green, Dan Brown, Danielle Steel and John Grisham—combined. (Read about some other writers' followings on social media.)

Many readers have come to see a writer's Internet persona as a digital extension of their books. For some fans, a personal tweet from their favorite novelist is more thrilling than a signed copy. Social media's influence on book sales has publishers pushing authors to put more of themselves online than ever before.

Mr. Coelho didn't get to the top of the digital pyramid by accident. His niblets of inspiration about life's challenges and personal fulfillment fit neatly with a link and a picture on a phone screen. He connects daily with readers, sending private messages of encouragement and comfort, while updating his blog and public feeds with snapshots from his life and aphorisms from his books. Fans describe being profoundly moved by his online affirmations, professing their love for him in retweets and comments.

A lapsed Catholic who returned to the faith in adulthood, Mr. Coelho made a fortune with "The Alchemist," a mystical tale of an Andalusian shepherd boy published in 1988. The book caught on slowly and eventually landed on the New York Times best-seller list, where it has spent more than 300 weeks and remains today. Fans snap up magnets and wall decals inscribed with lines from the book such as: "When you want something, all the universe conspires in helping you to achieve it."

ENLARGE

"Adultery," Mr. Coelho's 27th book, already is a best seller in Brazil, Portugal, France and eight other countries where it came out earlier this year. Mr. Coelho wrote it with characteristic speed, over the course of a few weeks. His U.S. publisher, Knopf, ordered an initial print run of 75,000 and anticipates strong digital sales. More than half his audience is between the ages of 18 and 30 and over 60% are women, according to Knopf.

Mr. Coelho has homes here, in Rio de Janeiro, Dubai, Paris and the Pyrenees—as well as a plane to travel among them. Geneva has become his base in part because it's near the countryside, where he takes walks (an app helps him count his average 10,000 steps a day). He estimates his net worth at $535 million, observing: "I am, thanks God, hyper-rich."

Years before other novelists joined Twitter and Facebook, Mr. Coelho was reaching out to fans on MySpace and, later, putting short videos on YouTube. He has accounts on Instagram, Tumblr, Vimeo, Google+ and Pinterest. He often posts during high-traffic intervals in the U.S. to reach the most readers. Since 2012, he has more than tripled the number of @paulocoelho followers on Twitter. He doesn't follow many people back—those he does include Jeremy Piven, Jessica Simpson and Deepak Chopra.

He speaks and writes in Portuguese, English and French and posts in Spanish through a translator. He also keeps up a presence on Russian and Chinese social media.

Related Reading on Speakeasy

In the digital realm, Mr. Coelho has leaped where others have side stepped: Horror-master Mr. King didn't join Twitter until late last year. Mr. Brown, author of "The Da Vinci Code," lets his office handle his Facebook and Twitter feeds.

Award-winning novelist Jonathan Franzen shuns Twitter altogether. Last year, he said authors feel "coerced" into constantly promoting themselves on the platform. "Agents will now tell young writers, 'I won't even look at your manuscript if you don't have 250 followers on Twitter,'" Mr. Franzen told BBC Radio 4.

Clearly, though, the right kind of digital engagement moves sales. When Grijalbo, an imprint of Random House Spain and Latin America, put the first chapter of "Adultery" online last month, it drew 10,000 views. Mr. Coelho then posted the link on Facebook and within 12 hours the tally jumped to more than 200,000, says his agent, Mônica Antunes.

With a goatee, a few strands of long white hair trailing down his neck and head-to-toe black clothes, Mr. Coelho looks more aging hippie than digital wizard. At the keyboard, he pecks with thick fingers, his gaze shifting between the monitor and his hands. On a recent afternoon while searching for references to himself and Chinese president Xi Jinping, who mentioned his writing in an interview, he turns up an image of a rabbit. "Sorry," he says, reaching for the mouse and trying again. ("Coelho" is "rabbit" in Portuguese.)

A bookmarked page on Mr. Coelho's computer reads: "Seven tools for monitoring the effectiveness of your tweets." He posts a Variety article about "The Pilgrim—The Best Story of Paulo Coelho," a biopic that debuted in Brazil on Thursday. To gauge how the post does, he monitors his Facebook stats, watching as a map lights up when the item draws a click: first, one in Alaska, then Germany, Colombia, Saudi Arabia, Greece, Poland, India. Within seconds, it receives 74 clicks.

Although he seldom travels to promote his work, Mr. Coelho says the bonds with his audience have never been stronger. "Now I can really interact with readers," he says. In the past, each reader at a book signing would ask him to autograph about three novels and pose for a photo, amounting to a two-minute encounter. All told, that meant interacting with maybe 90 readers at a few dozen book events each year.

Now, he figures, he can write "at least one kind word" to roughly 30 people a day and reach more than 10,000 a year. In the past six months, he has gained 4.1 million fans on Facebook through "likes" on his page.

In his public comments online, Mr. Coelho generates an aura of intimacy without revealing much beyond his biography or entangling himself in readers' struggles. "I went to the Church & prayed for you and for me" he recently tweeted, posting a picture of a mountaintop church. "Happy birthday to your mom" he told a fan who was giving a copy of "Adultery" as a gift.

Lately, he has tried to share more of his life by uploading a trove of personal documents and photos—including his baby scrapbook and childhood report cards—to his author website.

Born in Rio de Janeiro, the son of an engineer, he attended a strict Jesuit school, balking at what he has called the "constant threats of hell in the mouth of the priests."

Rebellious and determined to become a writer, Mr. Coelho says, he was committed to a mental institution by his parents three times starting in his teens. He had electroshock therapy and escaped twice.

As a young man, he briefly attended law school, traveled, dabbled in drugs and composed songs with the musician Raul Seixas. Mr. Coelho has described being imprisoned and tortured for alleged subversive activities due in part to his lyrics.

In his 30s, he says, a mystical meeting with a man he refers to as J. led him to walk the road of Santiago de Compostela in Spain, where he had a spiritual awakening. Then, at the age of 39, he launched his writing career with the novel, "The Pilgrimage."

Mr. Coelho's latest book is the story of a married female journalist whose interview with a Swiss politician and former boyfriend ricochets into risqué territory. ("Then I do something I've dreamed of doing since I was in school," Mr. Coelho writes. A few paragraphs later: "I feel like saying: Yes, I did something I shouldn't have done and yet I don't feel the tiniest bit guilty, just afraid of being found out.")

"Adultery" reflects the author's zeal for social media. For starters, he likes the one-word title because it goes well with a hashtag. Though in the past he has turned to fans for research, the latest work marks a new level of reader involvement. In November, Mr. Coelho asked fans who had been depressed to share their stories. "Anonymity is granted, but I may use your text without quoting you. This is the condition," he wrote on his blog. In one day, he received more than 1,000 emails. Instead of tales of clinical depression, he says, readers described affairs that torpedoed meaningful relationships.

Intrigued by the idea that marriages could have been saved if both parties had moved past the betrayal, Mr. Coelho switched his focus to adultery. In online adultery chat rooms, he posed as men and women for research. He drew on what he calls the "one or two" affairs early in his relationship with Brazilian painter Christina Oiticica, his fourth wife.

"I was with someone, she was with someone—but it never broke our relationship," he says. "You're traveling, you see someone and you have an affair. So I said, 'Oh my God, imagine if I divorced my wife just because she was in Madrid one night and I was I don't know where?' But then you're over this. And then the best company is her."

His wife confirms the account. The couple has been together since 1979 but didn't marry until last year. (Inspired by a passage in "Adultery" in which a character paraglides, Mr. Coelho recently asked Ms. Oiticica to try it with him. Wary of what could go wrong during such an adventure, she told him she didn't want to die single, so they exchanged vows before a judge in Geneva in November. They have yet to go paragliding.)

Ms. Oiticica's art is on the walls of the apartment here. The couple's home is surrounded by terraces with views of Mont Blanc and the Jet d'Eau, a landmark fountain on Lake Geneva. The cream and white interior, tended by a small staff, is punctuated by a few pieces of lipstick-red furniture. There are no books—Mr. Coelho gave them all away and reads everything on a Kindle or an iPad.

From his desk under an abstract piece of art featuring the Virgin Mary, he publishes several posts about his new book daily, often with links to its pre-order page on Amazon. Most days, he wakes at noon and devotes evenings to maintaining his online feeds. He stays up until four in the morning reading newspapers and books.

Most of Mr. Coelho's posts are "e-cards"—downloadable postcards often with a line or two from one of his novels against a backdrop of clouds, hearts or other inspirational clip art. This week, an e-card in Portuguese with a quote about the boredom of having it all racked up nearly 82,000 likes on Facebook in one day. The author says the format is publishing's future.

Mr. Coelho creates almost all his online material, though his publishers and his agent's staff in Barcelona pitch in with some e-cards. He also is helped by passionate fans in parts of the world where he doesn't speak the language.

These days, he is setting his sights on China. "One billion people!" he exclaims. A Chinese fan named Yan Lu-Schömburg maintains a Mandarin blog for Mr. Coelho and his foreign-language pages on Facebook and Weibo, the Chinese version of Twitter. The 35-year-old former teacher, who lives in Germany with her husband and son, views the work as a meditative exercise. "It's like refilling energy to my soul," she says. She isn't on salary but Mr. Coelho, who calls her a friend, pays her for some projects.

When writing online, Mr. Coelho avoids divisive subjects like global politics. But his comments in interviews can haunt him.

In 2012, he dismissed James Joyce's "Ulysses," telling a Brazilian newspaper the book was nothing but style and that the whole story could fit in a tweet. His quote went viral. In a post on the Guardian's books blog, critic Stuart Kelly blasted what he called Mr. Coelho's "nauseous broth of egomania and snake-oil mysticism."

Such online broadsides aren't uncommon and Mr. Coelho doesn't take them lightly. He tracks the computer addresses of his harshest observers. He even keeps a blacklist so he will know whom to reject if they ever ask a favor. "People," he says, "are a little bit scared of my revenge."

John Irving often referenced the importance of an intimate relationship between author and reader. The underlying theme? An act of forgiveness between the two parties. The reader forgives the author for not providing everything he was seeking in a work and the author forgives the reader for not fully understanding what he was trying to convey.

Coehlo hardly establishes that intimacy. Instead he says, "I'm there for you, but not really." He's performing the prank that many in his genereation engage in, and benefit from financially.

Basically, he's a joy boy. Joy Boys "want" and are responsible for nothing. "Want" prooof (pun intended) - here's a gem of a qote from his book: "When you want something, all the universe conspires in helping you to achieve it" that is celebrated by his readers.

Wanting and conspiring, is a proper approach from an author who relies on social media and has no sense nor any interest in establishing a true bond with his readers.

This copy is for your personal, non-commercial use only. Distribution and use of this material are governed by our Subscriber Agreement and by copyright law. For non-personal use or to order multiple copies, please contact Dow Jones Reprints at 1-800-843-0008 or visit www.djreprints.com.