Though Dr. Hofmann’s father was a Roman Catholic and his mother a Protestant, Dr. Hofmann, from an early age, felt that organized religion missed the point. When he was 7 or 8, he recalled, he spoke to a friend about whether Jesus was divine. “I said that I didn’t believe, but that there must be a God because there is the world and someone made the world,” he said. “I had this very deep connection with nature.”

Dr. Hofmann went on to study chemistry at Zurich University because, he said, he wanted to explore the natural world at the level where energy and elements combine to create life. He earned his Ph.D. there in 1929, when he was just 23. He then took a job with Sandoz Laboratories in Basel, attracted by a program there that sought to synthesize pharmacological compounds from medicinally important plants.

It was during his work on the ergot fungus, which grows in rye kernels, that he stumbled on LSD, accidentally ingesting a trace of the compound one Friday afternoon in April 1943. Soon he experienced an altered state of consciousness similar to the one he had experienced as a child.

On the following Monday, he deliberately swallowed a dose of LSD and rode his bicycle home as the effects of the drug overwhelmed him. That day, April 19, later became memorialized by LSD enthusiasts as “bicycle day.”

Dr. Hofmann’s work produced other important drugs, including methergine, used to treat postpartum hemorrhaging, the leading cause of death from childbirth. But it was LSD that shaped both his career and his spiritual quest.

“Through my LSD experience and my new picture of reality, I became aware of the wonder of creation, the magnificence of nature and of the animal and plant kingdom,” Dr. Hofmann told the psychiatrist Stanislav Grof during an interview in 1984. “I became very sensitive to what will happen to all this and all of us.”