Neurologist and author Oliver Sacks in 2009. (Chris McGrath)

Oliver Sacks, the world-renowned neurologist and author who chronicled maladies and ennobled the afflicted in books that were regarded as masterpieces of medical literature, died Aug. 30 at his home in Manhattan. He was 82.

Dr. Sacks — whom millions knew as the physician played by actor Robin Williams in the 1990 film “Awakenings” — revealed in February that he had terminal cancer. A rare and long-ago-treated ocular tumor had metastasized to his liver, he wrote in the New York Times, which was one of several publications, along with the New Yorker magazine and the New York Review of Books, that had printed his writings over the years.

His death was confirmed by his longtime assistant, Kate Edgar.

An Englishman who made his life in America, Dr. Sacks devoted his career to patients with rare, seemingly hopeless conditions of the nervous system. He distinguished himself both in the clinic and on the printed page and was often called a “poet laureate” of modern medicine.

His books, many of which were bestsellers, generally took the form of clinical anecdotes. A man who mistakes his wife for a hat, an artist who can no longer see colors, a hospital full of patients gloriously but fleetingly “awakened” from years-long catatonia: In each case, Dr. Sacks sought to uncover some wisdom, medical or moral.

The most famous of his patients were the ones he documented in his book “Awakenings,” published in 1973 and later adapted into director Penny Marshall’s Academy Award-nominated film.

The movie dramatized his experience at the Beth Abraham Home for the Incurables, a place in the Bronx that he renamed Mount Carmel in his account. His patients — actor Robert De Niro portrayed Leonard, the first to be revived — were among the hundreds of thousands of people stricken by encephalitis lethargica during and after World War I.

A large number of victims died from the disease. Of those who survived, many were reduced to a stonelike state similar to a severe form of Parkinson’s disease. With no known cure for their condition, the patients languished in institutions such as the one where the young Dr. Sacks, after failing as a laboratory researcher, found employment in 1966.

“They neither conveyed nor felt the feeling of life,” he wrote in “Awakenings,” describing the people he encountered. “They were as insubstantial as ghosts, and as passive as zombies.”

At the time, the drug L-dopa, short for levodihydroxyphenylalanine, had begun to show promise as a treatment for Parkinson’s disease. Before administering the medication to his patients, Dr. Sacks wrestled with misgivings about the Pandora’s box that might be opened by attempting to chemically rouse people who for so long had been removed from the world.

He obtained a clinical investigator’s license from the Food and Drug Administration to begin testing L-dopa on some patients. The results were astonishing.

“Occurring before us was a cataclysm of almost geological proportions,” wrote Dr. Sacks, “the explosive ‘awakening,’ the ‘quickening,’ of eighty or more patients who had long been regarded, and regarded themselves, as effectively dead. I cannot think back on this time without profound emotion — it was the most significant and extraordinary in my life, no less than in the lives of our patients.”

But in time, the positive effects of the drug receded and were replaced by intolerable manic behavior. Dr. Sacks said that he sometimes spent 20-hour days at the hospital trying to calibrate the doses. When he discontinued the drug, the patients reverted to their trancelike states.

“One or two of them said to me, ‘You open the window and you raise unbearable hopes and prospects,’ ” he told The Washington Post. “And now you close it.”

In 1970, Dr. Sacks described his experiences with L-dopa in a letter to the Journal of the American Medical Association. The responses from colleagues, published in a subsequent issue of the magazine, were furious. Dr. Sacks said he was “publicly roasted” by medical professionals who, in his view, “felt threatened by notions of uncontrollability and unpredictability that reflected on their own power and reflected on the power of science.”

The movie “Awakenings,” in which Dr. Sacks was renamed Malcolm Sayer, endeared him to the public and catapulted his books to widespread attention. Among critics and readers, he became known for his ability to eloquently capture in his descriptions the most confounding neurological disorders, from Tourette’s syndrome to autism to phantom limb syndrome to Alz­heimer’s disease.

“There was a hint of a smile on his face,” Dr. Sacks wrote in “The Man Who Mistook His Wife for a Hat” (1985), describing the titular patient, who suffered from a disorder of the brain. “He also appeared to have decided that the examination was over and started to look around for his hat. He reached out his hand and took hold of his wife’s head, tried to lift it off, to put it on. He had apparently mistaken his wife for a hat! His wife looked as if she was used to such things.”

In another noted volume, “An Anthropologist on Mars” (1995), Dr. Sacks presented abnormalities that he had found to have brought out “latent powers, developments, evolutions, forms of life, that might never be seen, or even be imaginable, in their absence.”

One of his patients, a painter he called “Mr. I,” had been injured in a car accident that had left him able to see only in black and white. “He would glare at an orange in a state of rage, trying to force it to resume its true color,” Dr. Sacks wrote. “He would sit for hours before his (to him) dark gray lawn, trying to see it, to imagine it, to remember it, as green. He found himself now not only in an impoverished world but in an alien, incoherent, and almost nightmarish one.”

Eventually, Dr. Sacks wrote, the painter found meaning in the highly structured, shaded canvases his new vision allowed him to create. When a physician proposed a treatment that might have restored his sense of color, the artist declined.

Dr. Sacks discomfited some readers, who maintained that he capitalized on his patients’ suffering to form handy parables. Tom Shakespeare, a British disability rights activist, called him “the man who mistook his patients for a literary career.”

Dr. Sacks disputed such suggestions.

“I appreciate the people I’m with. I think I respect them. If there’s any thought that I might embarrass or exploit them, I would never publish,” he told Newsday in 1997. “My desire is not to titillate or present monstrosities but — by showing how people and nervous systems respond to extremes — to bring out some of the nature of what it means to be human and how the nervous system works.”

He had a complicated medical history of his own. In his book “A Leg to Stand On” (1984), a metaphysical reflection on medicine, he described his recovery from a mountaineering accident that severely injured his left leg and left him temporarily with the sensation that the limb was no longer attached to his body.

In “The Mind’s Eye” (2010), he documented conditions including his own prosopagnosia, a difficulty in recognizing faces. His ocular tumor had blinded him in one eye.

Dr. Sacks also suffered from extreme shyness, a condition that he seemed able to overcome in the presence of his patients. His timidity was so great, he wrote in a memoir of his youth, “Uncle Tungsten” (2001), that he “identified at times with the inert gases . . . imagining them lonely, cut off, yearning to bond.”

Oliver Wolf Sacks, one of four sons in an observant Jewish family that included many scientists, was born in London on July 9, 1933.

Both his parents, he said, were “medical storytellers.” He went on house calls with his father, a ­Yiddish-speaking doctor, and studied anatomy with his mother, a surgeon who sought to instill in her son a love of anatomy by performing dissections with him.

She also instilled in him what he described as a sense of shame about his sexuality.

“You are an abomination,” she told him, Dr. Sacks recalled, when she learned of her son’s homosexual leanings. “I wish you had never been born.”

Dr. Sacks reflected on the exchange years later in “On the Move,” a memoir that would be his last volume published in his lifetime.

“We are all creatures of our upbringings, our cultures, our times,” he wrote. “My mother did not mean to be cruel, to wish me dead. She was suddenly overwhelmed, I now realize, and she probably regretted her words or perhaps partitioned them off in a closeted part of her mind. But her words haunted me for much of my life and played a major part in inhibiting and injecting with guilt what should have been a free and joyous expression of sexuality.”

During World War II, he was evacuated from London to a boarding school where, he said, he was deprived of food and caned by a sadistic headmaster, an experience that the future doctor linked to his attraction to the orderliness of science.

Medicine also would help him make sense of brother Michael’s experience with schizophrenia. People without the condition, Dr. Sacks recalled Michael saying, were “rottenly normal.” Two other brothers became physicians.

Dr. Sacks was educated in the 1950s at the University of Oxford, where, while pursuing his medical training, he experimented with LSD. “I did and did not realize I was playing with death,” he would write, describing a subsequent drug addiction that he said lasted several years.

In 1960, he embarked on a vacation in North America and, on arriving in Canada, sent his parents a telegram that read: “Staying.” He hitchhiked his way to San Francisco, where he took up motorcycles and befriended the ­British-born poet and counterculture figure Thom Gunn, who had written a verse titled “The Allegory of the Wolf Boy.”

“He speaks of the duplicity of the wolf boy, between his social life and his nocturnal, that appealed to me very much, the more so as my middle name is Wolf,” Dr. Sacks told the London Guardian, “and so I could pretend to have a sort of lycanthropic part. I would be Dr. Oliver Sacks, the intern, wearing a white coat in the daytime, and then, when the day was over, I would take off into the night, and go for long, crazy moonlit rides.”

He became a self-described “informal medical adviser” to a group of Hells Angels members, reportedly set a state weightlifting record with a 600-pound squat lift, and held several medical residencies before receiving an appointment at the Albert Einstein College of Medicine in the Bronx.

“Everything went wrong,” he told the Guardian. “I lost samples. I broke machines. Finally they said to me, ‘Sacks, you’re a menace. Get out. Go see patients. They matter less.’ ”

He published his first book, “Migraine,” in 1970, after treating patients who suffered from the debilitating headaches that he also had experienced since boyhood. His next book was “Awakenings.”

After many years at the Albert Einstein College of Medicine, Dr. Sacks held professorships at Columbia University and New York University School of Medicine.

His writings over the years found wide resonance. The Nobel Prize-winning playwright Harold Pinter wrote a play, “A Kind of Alaska,” based on “Awakenings.” A play by Peter Brook and an opera with music by Michael Nyman emerged from “The Man Who Mistook His Wife for a Hat.”

More recent books by Dr. Sacks include “Musicophilia: Tales of Music and the Brain” (2007), “Hallucinations” (2012) and “On the Move,” released in April. The last volume was dedicated to Billy Hayes, the author of several works of medical literature, with whom Dr. Sacks said he had fallen in love shortly after his 75th birthday. Besides Hayes, he had no immediate survivors.

Dr. Sacks described himself as “a man of vehement disposition, with violent enthusiasms, and extreme immoderation in all my passions.” Those passions included swimming (he swam every day), music (he was a fine pianist) and botany (he favored cycads).

To some, Dr. Sacks at times seemed as unusual as the patients who populated his books. “There will be no one like us when we are gone,” he wrote in the Times essay announcing his impending death, “but then there is no one like anyone else, ever.”