The conifer hedges in front of J. K. Rowling’s seventeenth-century house, in Edinburgh, are about twenty feet tall. They reach higher than the street lamps in front of them, and evoke the entrance to the spiteful maze in the film adaptation of “Harry Potter and the Goblet of Fire,” the fourth volume of her fantasy series. Rowling, who, at forty-seven, is about to publish her first novel for adults—it is set in a contemporary Britain familiar with Jay-Z and online pornography, but is shaded with memories of her own, quite cheerless upbringing—lives here with her second husband, Neil Murray, a doctor, and their children. She has a reputation for reserve: for being likable but shy and thin-skinned, and not at all comfortable with the personal impact of having created a modern myth, sold four hundred and fifty million books, and inspired more than six hundred thousand pieces of Harry Potter fan fiction, a total that increases by at least a thousand stories a week. Ian Rankin, the writer of Edinburgh-based crime novels, became friendly with Joanne Rowling when they were neighbors in another part of the city; he recently described her as “quite quiet, quite introspective.” He recalled urging Rowling to join him for an onstage interview at the Edinburgh International Book Festival, a few years ago. After Rowling watched Rankin being interviewed at a similar event, she told him, “I don’t think I can do that.” Rankin said, “I think she feels uncomfortable in a room full of adults. I’ve seen her in a room of kids, and she’s in her element.” Rankin noted that Rowling, in her writing, retains “the power of life and death over these characters.” She is wary “of situations you can’t always control—in the real world.”

In the spring, nearly five years after the appearance of the seventh, and final, Harry Potter novel, Little, Brown, Rowling’s publisher, announced “The Casual Vacancy,” and offered a glimpse of the plot: an idyllic English town named Pagford; the death of a man named Barry; a parish-council election. In response, a British publisher announced “The Vacant Casualty,” billed as a parody, if one can parody something whose contents are unknown. Commenters on the Guardian’s Web site guessed at Rowling’s likely models, with reference to Robertson Davies and “Desperate Housewives.” One reader, playing on Rowling’s word for non-wizard society, suggested an alternate title: “Mugglemarch.” And the hosts of Pottercast, a popular American fan podcast, picked over the press release, registering both delight at fresh data—Rowling has written ten tweets in three years—and a hint of worry that an extraordinary global bond between an author and her readers, and between two generations, was about to be severed. They were opening an invitation to a party where they might not be quite welcome. During the podcast, they looked up “parish council” on Wikipedia, and established that the term refers to the lowest rung of English local government. One of the hosts, Melissa Anelli—a thirty-two-year-old who runs a Potter Web site, stages an annual Potter convention, and has published a sharp-witted book about Potter enthusiasts—pondered the title, asking, “What’s casual, ever, about a vacancy?” She and her co-hosts wondered whether they’d go to a midnight party to celebrate the book’s launch, as many fans had for the later Potter novels.

In Britain, Ian Rankin typically publishes a new novel in October, and it tends to go to the top of the best-seller list. He said that, this year, his publisher moved the date to November, fearing that the late-September launch of “The Casual Vacancy” will, for weeks, render all other fiction invisible to readers and to the media. Rankin was taken aback but glad for the extra writing time. He wondered if “The Casual Vacancy” might have a whodunnit air; Rowling has talked to him of her admiration for British crime writing of the nineteen-twenties and thirties. “She loves Margery Allingham and Dorothy L. Sayers,” he said, adding that the Pagford setting had relieved him of his greatest fear: that Rowling had been working on a crime novel set in Edinburgh. He said, “I hope she’ll create an English village that she will know intimately—and it will be real to us.”

“I have drawn a map of Pagford,” Rowling told me when we met, in late August. “It’s one of the first things I did.” We were not speaking in her Edinburgh house, or at her country place—which stands in grassland, overlooking a fast-running river in a valley north of the city—or in her home in an expensive part of west London. We were at her office, which occupies an unmarked Georgian building on a handsome street in central Edinburgh, not too far from a café that, in mockery of competitors, has hung a sign that reads “J. K. ROWLING NEVER WROTE HERE.” The office has high ceilings, Turkish rugs over wooden floors, figurative oil paintings by modern Scottish artists, and the air of a small but very well-funded embassy. According to the London Sunday Times, Rowling is worth nine hundred million dollars.

An assistant had shown me to a front room on the parlor floor. Rowling was sitting at the head of a polished table, with a cup of black coffee and a newspaper; as I entered, she took off large black-framed glasses. She was slight, with her blond hair pulled back, and her V-necked sweater was pushed up at the sleeves to show freckled arms. She appeared to be wearing false eyelashes and rather heavy foundation. We talked at that table, and—after a brief, rainy walk—in the lounge of a nearby hotel. There was a stiffness to the transaction, but she was not unfriendly; she laughed now and then, and was clearly pleased to be able to talk about her book. It had been fourteen years, she calculated, since she’d been interviewed by someone who’d read the imminent novel. Once the Potter series had taken off, her representatives kept unflinching watch over Rowling’s words, in order to enhance the drama of synchronized international releases, and to help suppress piracy. (It was in this context that, in 2005, a British security guard who had stolen two copies of “Harry Potter and the Half-Blood Prince” from a book-distribution center fired a gun during negotiations to sell a copy to a reporter from the Sun.)

Her writing life was oddly self-contained, even if, by the end of the Potter series, she was receiving between one and two thousand pieces of mail a week. Rowling does not widely distribute her unpublished manuscripts, and her publishers seem to have processed them with little intervention. (Neil Blair, her agent, told me, “She takes a lot of time getting it right and then hands in a book that doesn’t need much editing.”) A few years ago, in a conversation with Melissa Anelli, the podcast host, Rowling criticized herself for not quite finishing “Harry Potter and the Order of the Phoenix.” “I didn’t do the final edit that I normally do before I hand it to the editors, and it definitely shows,” she said, sounding almost like a self-published author. In 2007, more than twenty-five million copies of “Harry Potter and the Deathly Hallows” were printed, in the first edition, and Rowling estimated that only seven people in the world, including her British agent and her editors in New York and London, had read the novel before stores began selling it.

I asked her if publishing the new book made her feel exposed. “I thought I’d feel frightened at this point,” she said. “Not just because it’s been five years, and anything I wrote after Potter—anything—was going to receive a certain degree of attention that is not entirely welcome, if I’m honest. It’s not the place I’m happiest or most comfortable, shall we say. So, for the first few years of writing ‘The Casual Vacancy,’ I kept saying to myself, ‘You’re very lucky. You can pay your bills, you don’t have to publish it.’ And that was a very freeing thought, even though I knew bloody well, in my heart of hearts, that I was going to publish it. I knew that a writer generally writes to be read, unless you’re Salinger.” After all the fretting—“Christ, you’re going to have to go out there again”—she discovered that she was calm. “I think I’ve spent so long with the book—it is what I want it to be,” she said. “You think, Well, I did the best I could where I was with what I had.” She laughed. “Which is a terrible paraphrase of a Theodore Roosevelt quote.”

In the decade or so after A. A. Milne published the “Winnie-the-Pooh” books, in the nineteen-twenties, he wrote several plays and novels for adults, as well as an autobiography in which he expanded on a thought expressed by a character in an Arnold Bennett play: that the artist who has early success with a painting of a policeman is expected to paint policemen forever. Milne wrote, “If you stop painting policemen in order to paint windmills, criticism remains so overpoweringly policeman-conscious that even a windmill is seen as something with arms out, obviously directing the traffic.” He added, “As a discerning critic pointed out: the hero of my latest play, God help it, was ‘just Christopher Robin grown up.’ So that even when I stop writing about children, I still insist on writing about people who were children once.”

I read “The Casual Vacancy,” which is five hundred and twelve pages long, in the New York offices of Little, Brown, after signing a non-disclosure agreement whose first draft—later revised—had prohibited me from taking notes. (With this book, Rowling was hoping for a “more run-of-the-mill publishing experience,” but that hope goes only so far.) Within a few pages, it was clear that the novel had not been written for children: “The leathery skin of her upper cleavage radiated little cracks that no longer vanished when decompressed.” A little later, a lustful boy sits on a school bus “with an ache in his heart and in his balls.” But reviewers looking for echoes of the Harry Potter series will find them. “The Casual Vacancy” describes young people coming of age in a place divided by warring factions, and the deceased council member, Barry Fairbrother—who dies in the first chapter but remains the story’s moral center—had the same virtues, in his world, that Harry had in his: tolerance, constancy, a willingness to act.

“I think there is a through-line,” Rowling said. “Mortality, morality, the two things that I obsess about.” “The Casual Vacancy” is not a whodunnit but, rather, a rural comedy of manners that, having taken on state-of-the-nation social themes, builds into black melodrama. Its attention rotates among several Pagford households, in the Southwest of England: a gourmet-grocery owner and his wife; two doctors; a nurse married to a printer; a social worker. Most of the families include troubled teens.

Barry’s civic influence is revealed by his departure, rather as George Bailey’s is in “It’s a Wonderful Life.” The story is driven by the long-standing frustration that some of Barry’s disagreeable and right-wing neighbors have about the town’s administrative connection to the Fields, an area of public housing and poverty on the edge of a larger, nearby town. Historically, children from the Fields have had the right to attend primary school in Pagford, a place of flower baskets and other middle-class comforts, and the town has also supported a drug-treatment clinic that serves the neighborhood. In the absence of Barry’s righteous influence, the anti-Fields faction sees an opportunity to rid Pagford of this burden. This is a story of class warfare set amid semi-rural poverty, heroin addiction, and teen-age perplexity and sexuality. It may be a while before we’re accustomed to reading phrases like “that miraculously unguarded vagina” in a Rowling book, and public response to “The Casual Vacancy” will doubtless include scandalized objections to the idea of young Harry Potter readers being drawn into such material. “There is no part of me that feels that I represented myself as your children’s babysitter or their teacher,” Rowling said. “I was always, I think, completely honest. I’m a writer, and I will write what I want to write.”

She was ready for a change of genre. “I had a lot of real-world material in me, believe you me,” Rowling said. “The thing about fantasy—there are certain things you just don’t do in fantasy. You don’t have sex near unicorns. It’s an ironclad rule. It’s tacky.” She then added, carefully, “It’s not that I just wanted to write about people having sex.” Rather, she began with the idea of writing about a local election, which gave her a “rush of adrenaline.” The Harry Potter series had an alluring creation story, known to all fans: in 1990, on a delayed train between Manchester and London, Rowling was overwhelmed by the thought of a boy who learns, at the age of eleven, that he is a wizard. The idea for “The Casual Vacancy” also came to Rowling while she was travelling, but this time she was on a private plane, touring America to promote “Harry Potter and the Deathly Hallows.”

“It’s been billed, slightly, as a black comedy, but to me it’s more of a comic tragedy,” she said. If the novel had precedents, “it would be sort of nineteenth-century: the anatomy and the analysis of a very small and closed society.” A local election was “a perfect way in,” she said. “It’s the smallest possible building block of democracy—this tiny atom on which everything rests.” One could say that national politics does not rest upon local politics, and that no modern British town is a closed society; some of Rowling’s characters may seem eccentric for the earnestness with which they regard a local election. She acknowledged that the scale of parish-council decision-making is “easy to laugh at” but said that “part of the point is that those decisions that are being made do dramatically affect people’s lives, up to life and death sometimes.”

She said, “In my head, the working title for a long time was ‘Responsible,’ because for me this is a book about responsibility. In the minor sense—how responsible we are for our own personal happiness, and where we find ourselves in life—but in the macro sense also, of course: how responsible we are for the poor, the disadvantaged, other people’s misery.” Two years in, she picked up the standard British handbook for local administrators. “I needed it to check certain abstruse points. And in there I came across the phrase ‘a casual vacancy.’ Meaning, when a seat falls vacant through death or scandal. And immediately I knew that that was the title. . . . I was dealing not only with responsibility but with a bunch of characters who all have these little vacancies in their lives, these emptinesses in their lives, that they’re all filling in various ways.”

She added, with some passion, “And it’s death! The casual vacancy, the casualness with which death comes down. You expect a fanfare, you expect some sort of pathos or grandeur to it. And, you know, the first big death I ever suffered was my mother’s, and it was that that was so shocking: just gone.”

Rowling is not a recluse: she read at the opening ceremony of the London Olympics; she was Harvard’s commencement speaker in 2008; she appeared in a television documentary about her family tree. But she is not a part of everyday British cultural life. (“I’m not a natural joiner,” she told me.) Her nonfiction canon adds up to just a few thousand words, and includes a single book review—she praised the letters of Jessica Mitford, the British writer and left-wing activist, for whom Rowling’s older daughter is named—and a short essay in a collection of speeches by Gordon Brown, the former Labour Prime Minister, whom she admires, and whose wife, Sarah Brown, is a friend. She has given limited access to her personal history, and in interviews has tended to strike the same few notes: a friend in her teen-age years who freed the two of them by having access to a Ford Anglia, the same car driven by Ron Weasley, Harry Potter’s friend; the train ride that delivered Harry to her; a difficult period, in the nineties, as a single mother. Last year, Lifetime constructed a biopic out of these fragments, filling the gaps with surreally misjudged approximations of a middle-class West Country childhood in the sixties and seventies: in the film, Rowling’s secondary school has exposed timber beams, and people say “I love you” at the end of phone calls.

Rowling’s father was an engineer at the Rolls-Royce aircraft-engine plant in Bristol, and Rowling and her younger sister, Dianne, spent their earliest years in villages just outside that city, which is two hours west of London. When Joanne was nine, the family moved a little farther west, to the edge of the Forest of Dean, a more rural and less prosperous district. Neither of Rowling’s parents went to college, but her mother’s family was solidly middle class and educated; Joanne’s great-aunt Ivy was a classics teacher, and she introduced Joanne to Mitford’s writing. The Rowlings now lived in a handsome Gothic Revival cottage, by a church, in the village of Tutshill. “My voice wasn’t Forest of Dean, although it became Forest of Dean, believe you me, pretty damn quickly,” Rowling said. Her accent is still subtly flexible, and at one point in our conversation she exclaimed like a Scot: “Och!” She said that, after the family’s twenty-mile move, “I always felt an outsider.” There’s a resentfully uprooted teen-age Londoner in “The Casual Vacancy,” and Rowling volunteered that this is a partial self-portrait.

Unlike other members of her family, Rowling regularly attended services in the church next door. At eleven, she enrolled at Wyedean, a new secondary school. Her mother—a woman of French and Scottish heritage with a smile that was slightly skewed, like her daughter’s—later worked in the school, as a technician in the science department. Steve Eddy, who taught Rowling English when she first arrived, and has since become a writer with an interest in mythology and astrology, remembers Joanne as “not exceptional” but “one of a group of girls who were bright, and quite good at English.” Referring to Harry Potter’s bookish friend, he said, “I suppose you could say she was a bit Hermione-like. I’d ask a question, and some hands would shoot up, and she was definitely one of the group.” He recalled that the class read Stan Barstow’s “Joby”—a realist story about a working-class Northern boy—as well as “The Weirdstone of Brisingamen,” by Alan Garner (a wizard, dwarfs, witches), and “A Wizard of Earthsea,” by Ursula K. Le Guin, whose hero attends a school for wizards. Eddy said that Rowling, when writing stories, was much more likely than other students to produce fantasy. At the time, she had little taste for realism.

Several of the key characters in “The Casual Vacancy” are in their mid-teens, and the novel seems most comfortable when it’s with them. This is partly a question of grouping and movement; these are the novel’s tracking shots, when it can follow children on bus rides, on bicycles, and along school corridors; their parents, understandably, are less dynamic. But Rowling also seems profoundly connected to her own teen-age self. (“What does that say about my arrested development, I wonder?” she asked.) One well-observed and recurring motif is the teen-age instinct to adopt, and find comfort in, the families of others—just as Harry Potter adopted the Weasleys. Rowling referred to Jessica, her daughter from her first marriage, who is now a college student but who, until recently, was in a group of friends who moved “from house to house, all of them being charming to everyone else’s parents.”