William Shawn, the shy, strong-willed editor who ran The New Yorker for a third of this century, died yesterday morning at the apartment on the Upper East Side of Manhattan where he had lived since 1950. He was 85 years old. He died of a heart attack, said his son Wallace Shawn, the actor. After Mr. Shawn succeeded the magazine's founding editor, Harold Ross, in 1952, he quietly but firmly presided over a shift from its original flippancy to a more serious tone, which, he insisted, merely mirrored "a new awareness" among writers and readers. In his quiet, considerate, infinitely courteous way, Mr. Shawn remained the virtual dictator of the magazine's editorial policies through his 35-year tenure, which was unusually long for a chief editor in the hectic and turbulent magazine industry. A chief reason that Mr. Shawn stayed so long in his post -- one of the most influential in American literature and journalism -- was the abiding support of The New Yorker's owners, Raoul Fleischmann of Fleischmann's Yeast, who was a co-founder of the magazine and became its chairman, and his son Peter F. Fleischmann, also a longtime New Yorker executive. But in 1985, while the younger Mr. Fleischmann was chairman and a major stockholder, the magazine was sold for $142 million to Advance Publications, a portion of the vast publishing empire of the Newhouse family. At the time, S. I. Newhouse Jr. pledged not to tamper with The New Yorker's special identity. In January 1987, however, Mr. Newhouse announced that Mr. Shawn was retiring -- although in fact he was forced out -- and, being replaced by Robert A. Gottlieb, then 55, who had been president and editor in chief at Alfred A. Knopf, the book-publishing house that is another part of the Newhouse empire. Five years later, in July 1992, Mr. Gottlieb was replaced by Tina Brown. The New Yorker staff did not take happily to the prospect of Mr. Shawn's departure. More than 150 of the magazine's writers, editors and cartoonists, feeling that Mr. Shawn had been poorly treated by the new owners, signed a letter calling on Mr. Gottlieb not to take the job. In due course, however, Mr. Gottlieb took over Mr. Shawn's duties and turned out to be far more a protector of Mr. Shawn's vision than a destroyer of it. Later in 1987, Mr. Shawn became a consulting editor for another prestigious book-publishing concern, the independently owned Farrar, Straus & Giroux, a position he held at his death. In his decades of editing The New Yorker, Mr. Shawn worked with infinite patience and painstaking attention to detail. A perfectionist, he once said ruefully, "Falling short of perfection is a process that just never stops." His mental rigor, applied to editing, won him repeated praise from New Yorker writers. "He knows when to leave a strong piece alone," the author and critic Renata Adler once said. "If there really are weak parts, though, he invariably finds them; then of course you can fix them in your own way." Mr. Shawn's quiet graciousness was so seductive that Brendan Gill once said the typical New Yorker writer became convinced that any changes the editor demanded "will cost Shawn as much pain as they do him -- indeed, that the corrections are being made, at no matter what expense of spirit, only in order to bring a masterpiece from near-perfection to perfection." The short-story writer and novelist J. D. Salinger called Mr. Shawn the "most unreasonably modest of born great artist-editors." As the Shawn era progressed, The New Yorker earned new respect for what became a continual outpouring of reports and commentaries on such matters as the environment, poverty, racial strife, the Vietnam War and nuclear disarmament. "Better than any other editor of our time, he has been able to measure the distance of our national fall from grace," Mr. Gill once said, voicing the admiration that generations of New Yorker writers felt for Mr. Shawn. But Mr. Gill acknowledged wryly that "at times, one heard grumblings, in the corridors of the magazine and out in the world," about the amount of gloom in the magazine. Under Mr. Shawn, The New Yorker's literary and reportorial styles continued to exercise a powerful influence on writers around the country, as they had under Mr. Ross. One much-cited example was Truman Capote's 1965 best seller, "In Cold Blood," which came out first in The New Yorker and encouraged other writing that straddled the line between fact and fiction. But in Mr. Shawn's day, The New Yorker's nonfiction writing also came to help shape public opinion and discussion about important issues. James Baldwin's writing underscored the force of black grievances, for instance, and Rachel Carson's lent urgency to concerns about the environment. The New Yorker sent the political philosopher Dr. Hannah Arendt to attend the 1961 trial of Adolf Eichmann in Jerusalem, and her coverage added to the continuing controversy about the Holocaust. A New Yorker review of Michael Harrington's 1963 book, "The Other America," helped draw attention to the work and thereby to the whole issue of poverty in the United States. "Shawn changed The New Yorker from a smarty-pants parish tip sheet into a journal that altered our experience instead of just posturing in front of it," John Leonard, a book critic for The New York Times, observed in 1975. The Shawn era also had its disappointments. Mr. Shawn himself observed regretfully in a 1979 interview that during his time as editor there had been fewer "out-and-out humorists than in the 1920's." The Shawn era also included some disappointments on The New Yorker's business side -- from which Mr. Shawn stayed largely aloof. Average circulation per issue climbed, for instance, from about 485,000 for 1974 to a peak of about 510,000 for 1983 but then dropped back toward 500,000 for 1984 -- the year before the magazine was sold. Somewhat similarly, the number of pages of advertising in The New Yorker rose in the late 1970's and early 1980's to a peak of almost 4,500 pages for 1981 and then sagged in the next three years to about 3,500 pages for 1984, And advertising revenues fell from 1984 to 1985 and from that year to 1986 -- that is, during Mr. Shawn's last two full years at the editorial helm. Mr. Shawn's decades at the New Yorker also included an apparent permutation in his own writing: it seemed to rise from humble spoofery to occasional heights of Olympian solemnity. In 1936, three years after joining the magazine, he contributed a fey piece of fantasy, "The Catastrophe," in which a meteor "landed, nice and tidy, on all five boroughs of Greater New York." "The only New Yorkers who escaped were those who chanced to be at Miami Beach," he wrote, "and there they remained, shaking their heads and trying to find someone who would cash their checks." Forty-three years later, in an introduction to "Janet Flanner's World," a collection of articles by the correspondent known as Genet, he wrote this sober analysis of the reporter's craft: "New information resides nowhere until it has been identified, objectified, assembled, and communicated by one or another kind of reporter; and every reporter sets out on every quest more or less in the dark. At first, there is little to go on except instinct; but at last, as fragment after fragment falls into place, information materializes, and some light, with luck, is cast." Mr. Shawn made a sober impression himself, with his aldermanic good manners and his dark suits. But he relished good humorous writing, he played jazz expertly on the Steinway in his apartment -- and, among editors and writers, he was sometimes the subject of anecdote and amusement. That was because of his many mild eccentricities and his highly unlikely credentials for running a magazine that in some ways was the embodiment of upper-middle-class New York sophistication. He disliked crowds, fast driving, air conditioning and self-service elevators. (When the elevators at The New Yorker's offices at 25 West 43d Street were automated, one was left in manual operation to accommodate him.) He was short and physically unimposing, he generally avoided night life, and his idea of a power lunch was orange juice and cereal in the Rose Room at the Algonquin Hotel. He was a college dropout who cut his journalistic teeth on an obscure New Mexico newspaper. And a certain unabashed flatness in his speech forever proclaimed his upbringing in Chicago. Yet while the chuckles continued, and while the editors came and went at other magazines, Mr. Shawn's reign continued, more or less serenely and unchallenged, until he had far exceeded Mr. Ross's 26-year tenure as editor. Mr. Shawn's durability had several interrelated causes in addition to the support of the Fleischmann family, which owned much of The New Yorker's stock; Raoul Fleischmann left him $100,000 in his will. As an editor, Mr. Shawn was enormously skillful; he was a gifted, though idiosyncratic, editorial administrator; and the respect and affection that other editors and writers had for him was unusually warm. In his editing, Mr. Shawn had high standards: once, the story goes, he was discussing an idea for some intellectually lofty writing by Dr. Arendt, and she suggested that The New Yorker's readers would not be interested. But he replied that he did not care: the writing would be good for them. One of his strengths was his sternly logical mind, which never seemed to rest -- with the result, another story had it, that once, when he was learning to drive a car, he complained to the instructor: "If one is disengaging the gears, one ought to have to let the clutch out, instead of pushing it in. To me, 'in' represents engagement and 'out' represents disengagement." But there was criticism, too. The writer Dorothy Parker complained in the 1960's that much of the writing appearing then seemed "to be about somebody's childhood in Pakistan." The personality pieces were sometimes called too long and lacking in irreverence; its fiction was belittled by some as favoring fragile stylists. In 1965, the essayist Tom Wolfe contended in the New York Herald Tribune that Mr. Shawn had made The New Yorker "the most successful suburban women's magazine in the country." As an editorial administrator, Mr. Shawn played his cards close to his chest: for years he avoided holding meetings, preferring to deal with his assistants and writers one by one. He was so secretive that Mr. Fleischmann, when asked at the 1974 New Yorker stockholders' meeting whether Mr. Shawn had a deputy, had to reply cautiously: "I don't believe so." (Formally speaking, Mr. Shawn did not, but when he was absent from the magazine, his place was taken by Gardner Botsford, another editor.) Mr. Shawn also had a strong sense of propriety. Mr. Gill reported in his memoirs that once Mr. Shawn, finding himself in an elevator with a tipsy writer who was talking loutishly in front of a woman, told the elevator operator, "Please stop. I must get off at once." Some New Yorker people have suggested that Mr. Shawn's notions of decorum might stem partly from his bourgeois upbringing in Chicago, where he was born on Aug. 31, 1907, the son of Benjamin W. Chon, a well-to-do cutlery merchant of Central European origin, and Anna Bransky Chon. (Mr. Shawn changed his name early in his career.) After schooling in Chicago, he spent two years at the University of Michigan, then dropped out and set off for New Mexico because, he later said, "I thought I'd like the climate." In the central New Mexico town of Las Vegas, a health resort and livestock trading center, he went to work as a $30-a-week reporter on a local newspaper, The Las Vegas Optic. After several months, he returned to Chicago, where he worked as an editor for a news service and married a news paperwoman, Cecille Lyon. The young couple spent a year or so in Europe; in Paris, by some accounts, Mr. Shawn worked as a piano player. He tried his hand as a writer and as a composer of music, largely for ballet. Mr. Shawn had long been a fascinated reader of The New Yorker, and in time the Shawns moved to New York. Once there, he began doing reporting assignments for the magazine's Talk of the Town section. "I was paid $2 an inch when the piece appeared," he later said. "It was practically starvation. After a while they let me come into the office and work." As time passed, the boyish-looking reporter became known as a prodigy of conscientiousness and organization. In 1935, he turned his hand to editing, although he still wanted to write. Mr. Shawn worked extremely hard in those days, but he also enjoyed relaxing. "About once a month we'd have a party and about 30 or 40 people would show up," The New Yorker veteran E. J. Kahn Jr. wrote in his book "About the New Yorker and Me." "Shawn was our star. He'd be our piano player." He was also quite good as an editor in the '30's, but it was after the outbreak of World War II, the New Yorker contributor James Thurber wrote in his memoir "The Years With Ross," that Mr. Shawn really came to the fore. By Mr. Thurber's account, St. Clair McKelway, who had had the title of managing editor and edited nonfiction, left to join the armed forces, and another New Yorker executive, Ik Shuman, suggested that Mr. Shawn replace him. "What the hell makes you think he could handle the job?" Mr. Ross spluttered, according to Mr. Thurber. "Dismiss it from your mind." But Mr. Shawn got the job, and he and Mr. Ross got on famously, although, as the New Yorker writer E. B. White once put it, Mr. Ross "was a creature of the 20's, when everyone was kicking up his heels." "Shawn was a creature of the 30's, when men were peddling apples," he said. The Ross-Shawn collaboration proved highly fruitful: Mr. Thurber's appraisal was that "without Shawn's hard work and constant counsel, Ross would never have made the distinguished record he did as editor during the war." As the war went on, Mr. Gill recalled in his book "Here at The New Yorker," "Shawn worked something like 18 hours a day, seven days a week; he was a phenomenon of apparently imperturbable industry." He was also, as Mr. Ross once put it, "peerless as an idea man," and he managed to sell Mr. Ross on the idea of devoting one whole New Yorker issue to "Hiroshima," John Hersey's 31,347-word piece about the obliteration of that city by the atomic bomb and the fate of its inhabitants. The "Hiroshima" issue was a striking departure from The New Yorker's traditional format and, as The Herald Tribune observed at the time, from "its usual content of quip, cartoon and causticism." The issue was an enormous critical success. In the postwar years, Mr. Shawn remained indispensable to Mr. Ross. One evening in 1948, Mr. Thurber wrote in his memoirs, Mr. Ross mentioned Mr. Shawn so often, during a conversation with H. L. Mencken and George Jean Nathan, that Mr. Nathan asked "Who is Shawn? Who is Shawn?" By 1951, when Mr. Ross's health was failing, he "had made it clear to some of us that he wanted Bill Shawn to succeed him" and "devoutly hoped he would," Mr. Thurber reported. And Mr. Gill wrote that "none of us supposed that there was a chance of the editorship's going to anyone but Shawn," although, he said, Gustave Lobrano, who was Mr. Ross's deputy in charge of fiction and also had the title of managing editor, was disappointed not to get the job. The actual choice was made by Raoul Fleischmann, who was then the magazine's publisher. Mr. Shawn's longstanding ties to New Yorker writers continued after he stepped down as editor in 1987 and began working with Farrar, Straus & Giroux, where he brought in a number of books. Jonathan Galassi, the editor in chief at Farrar, Straus, said one of the books on which Mr. Shawn had done the most intensive editing for Farrar, Straus was Charlayne Hunter-Gault's "In My Place," a memoir published last month, about her life in the South from her birth to her becoming , in 1961, one of the first black students to enter the University of Georgia. It was Mr. Galassi who had brought Ms. Hunter-Gault to Farrar, Straus to publish her first book, and he said she had asked to have the book edited by Mr. Shawn, who had hired her to work at The New Yorker as a staff writer years earlier. Mr. Shawn's son Wallace said yesterday that in his last years Mr. Shawn had mainly been engaged in "doing his own writing." Asked what Mr. Shawn was writing, Wallace Shawn said "We didn't ask him, really, but I think it was fiction." He also said the family did not know where the manuscript was, and added, "Unless he destroyed it, I'm sure it'll turn up." Asked what Mr. Shawn thought of Tina Brown's first months as chief editor of the New Yorker, Wallace Shawn said his father had never given any indication of his views of the magazine's current direction. Then he paused a moment, and said of his father, "You know, if he had lived for another couple of years, we might well have had a discussion on the subject." And he added, "I learned today from my mother that he was planning to have lunch with Tina Brown, and I know that he still wished everyone at the magazine very, very well." In addition to his wife of 64 years and his son Wallace, of Manhattan, Mr. Shawn is survived by another son, Allen, of North Bennington, Vt., a composer who teaches at Bennington College; a daughter, Mary Shawn of Langhorne, Pa., and two grandchildren.