The patient’s youth and good health before this illness should work in his favor, she said, adding, “We’re hopeful that he will be alive and well for a long time.”

The doctors declined to say what products the patient had been vaping, how long he had been doing it or how often. About 86 percent of the patients with lung injuries in this outbreak had vaped THC, the chemical in marijuana that makes people high.

The case is the first transplant reported in the nationwide outbreak of vaping-related lung injuries, and it highlights the severity of an illness that, as of Nov. 5, had sickened 2,051 people and killed 40.

“I believe we are just beginning to see the tip of the iceberg,” Dr. Allenspach said.

Researchers have described the lung damage from vaping as chemical burns, similar to the injuries in people who have inhaled toxic fumes in industrial accidents, or in soldiers attacked with mustard gas in World War I.

The patient was first admitted to a different hospital on Sept. 6 with what was thought to be pneumonia. His condition worsened and he was placed on a ventilator on Sept. 12. His health continued to deteriorate. On Sept. 17, he was transferred to a second hospital, where he was connected to a machine that delivers oxygen directly to the bloodstream.

His health continued to decline, and on Oct. 3, he was transferred to Henry Ford Hospital, where he was put on the waiting list for a lung transplant. A national organization sets the criteria for eligibility, not individual hospitals. Several factors quickly pushed him to the top of the list, Dr. Nemeh said: He was a child, the lung damage was irreversible and he would die without the transplant.

The surgery was performed on Oct. 15. The doctors said they could not reveal any information about the source except to say that the donor had been healthy.