Phlegm in the Lungs: Causes and When to Worry

Phlegm in the lungs is caused by inflammation or irritation of the airways, which triggers specialized cells to ramp up mucus production well beyond normal levels. Your lungs always produce some mucus to trap dust, germs, and other particles, but when something goes wrong, that thin protective layer becomes the thick, sticky phlegm you cough up. The trigger can be anything from a common cold to long-term smoking, chronic disease, or even acid reflux.

How Your Lungs Produce Mucus Normally

Your airways are lined with two types of mucus-producing cells: goblet cells on the airway surface and mucous cells buried in small glands beneath the airway lining. Together, they secrete gel-forming proteins called mucins that give mucus its slippery, sticky texture. This mucus forms a thin blanket over the airways, trapping inhaled particles and pathogens before tiny hair-like structures called cilia sweep everything up toward the throat, where you swallow it without noticing.

This system works quietly in the background. You only become aware of it when something causes those cells to overproduce mucus, or when the cilia stop clearing it efficiently, or both.

Respiratory Infections

The most common reason for a sudden increase in phlegm is an infection. When a virus or bacteria invades the airways, the immune system responds with inflammation. The airway walls swell, goblet cells multiply and pump out more mucus, and the result is that heavy, congested feeling in your chest along with a productive cough.

Acute bronchitis, often called a chest cold, is a textbook example. The airways swell and flood with mucus, triggering a cough that can last for weeks even after the infection itself clears. Pneumonia produces phlegm through a similar inflammatory process, but deeper in the lungs, in the tiny air sacs where oxygen exchange happens. Influenza, COVID-19, and common respiratory viruses all provoke the same overproduction.

Yellow or green phlegm generally signals an infection, though the color alone can’t tell you whether it’s viral or bacterial. The greenish tint comes from an enzyme released by white blood cells fighting the infection, not from the type of germ involved.

Smoking and Vaping

Cigarette smoke is one of the most potent triggers for chronic phlegm. It works through a two-part mechanism: it makes the lungs produce more mucus while simultaneously crippling the system that clears it.

Smoke particles slow the beating of cilia, the tiny structures responsible for moving mucus out of the airways. Research shows that eight hours after smoking a cigarette, mucociliary clearance is measurably slower than in nonsmokers, and the effect worsens with heavier smoking habits and more pack-years of exposure. Over time, chronic smoke exposure can destroy cilia entirely, leaving mucus to pool in the airways. Meanwhile, the irritation from smoke causes goblet cells to proliferate, so the lungs are producing more mucus with fewer tools to remove it. This is why many smokers develop a persistent productive cough, sometimes called “smoker’s cough,” that tends to be worst in the morning after mucus has accumulated overnight.

COPD and Chronic Bronchitis

Chronic obstructive pulmonary disease represents what happens when years of irritation, usually from smoking, permanently remodel the airways. In COPD, the bronchial mucus glands grow larger and more numerous, and the airway lining itself shifts to contain more mucus-producing cells. The small airways, those less than 2 millimeters in diameter, become narrowed as their walls thicken and their openings fill with inflammatory debris mixed with mucus.

Chronic bronchitis, one form of COPD, is specifically defined by this mucus overproduction. If you have a productive cough lasting at least three months in two consecutive years, and other causes have been ruled out, that meets the clinical definition. The structural changes in the airways at this stage are not fully reversible, which is why phlegm production in COPD is ongoing rather than temporary.

Asthma and Allergies

Asthma involves chronic airway inflammation that leads to excessive mucus production alongside airway narrowing and heightened sensitivity to irritants. During an asthma flare, the airways tighten and fill with thick mucus, making it harder to breathe and sometimes triggering a cough that brings up phlegm. Allergic asthma, triggered by things like pollen, dust mites, pet dander, or mold, follows the same pattern: the immune system’s overreaction to an allergen drives inflammation and mucus secretion in the airways.

Even without a formal asthma diagnosis, allergic reactions in the airways can produce phlegm. Postnasal drip from allergies is often confused with lung phlegm, since mucus draining from the sinuses down the back of the throat can trigger coughing and a feeling of chest congestion.

Air Pollution and Environmental Irritants

Particle pollution, including fine particles from vehicle exhaust, industrial emissions, wildfire smoke, and dust, triggers inflammation when particles deposit in the airways. The EPA identifies fine particulate matter (PM2.5), organic carbon particles, and combustion-related metals as key irritants. These particles provoke an immune response that mirrors what happens during an infection: the airways swell, mucus production increases, and the lungs become more reactive to further irritants like cold air or allergens.

For people who already have COPD or asthma, the effect is compounded. Particle pollution aggravates existing airway inflammation, increases sputum production, and can create localized “hot spots” in the lungs where particles accumulate faster than they can be cleared. Occupational exposures to coal dust, silica, grain dust, or chemical fumes can cause the same kind of chronic irritation and phlegm production over years of exposure.

Acid Reflux and Microaspiration

One of the less obvious causes of chronic phlegm is gastroesophageal reflux. When stomach acid travels up the esophagus, it can affect the lungs through two pathways. The first is a nerve reflex: acid irritating the lower esophagus activates a shared nerve pathway (the vagus nerve) that triggers coughing and can stimulate mucus production in the airways. The second is microaspiration, where tiny amounts of stomach contents travel all the way up the esophagus, past the throat, and trickle into the airways, directly irritating the lung lining.

Microaspiration is more likely when protective reflexes in the throat and larynx are weakened, which can happen during sleep or in people with swallowing difficulties. What makes this cause tricky is that many people with reflux-related lung symptoms don’t have classic heartburn. They may only notice a chronic cough with phlegm, throat clearing, or a sensation of something stuck in the throat. If you’ve had unexplained phlegm for weeks without signs of infection, reflux is one of the possibilities worth considering.

Cystic Fibrosis

Cystic fibrosis is a genetic condition that fundamentally changes the quality of mucus throughout the body, including the lungs. It’s caused by mutations in a gene that controls a chloride channel on the surface of mucus-producing cells. Normally, this channel moves chloride ions in and out of cells, and water follows the chloride, keeping mucus thin and fluid. When the channel doesn’t work, water can’t reach the mucus properly, and the result is abnormally thick, sticky secretions that clog the airways.

Unlike the other causes on this list, cystic fibrosis is present from birth and is typically diagnosed in childhood, though milder forms occasionally go undiagnosed until adulthood. The thick mucus traps bacteria and creates a cycle of chronic lung infections and inflammation that progressively damages the airways.

When Phlegm Becomes a Concern

A cough with phlegm during a cold or flu is normal and usually resolves within a few weeks. A cough lasting three to eight weeks is considered subacute, and one lasting longer than eight weeks is classified as chronic. In children, the threshold is four weeks. Persistent phlegm production beyond these windows suggests something more than a passing infection, whether that’s uncontrolled asthma, reflux, ongoing smoke exposure, or an underlying lung condition.

Changes in phlegm can also be informative. A shift from clear or white to yellow or green often signals an active immune response. Pink or rust-colored phlegm can indicate blood, which warrants prompt attention. A sudden increase in the volume of phlegm, especially alongside fever, shortness of breath, or chest pain, can point to a new infection layered on top of a chronic condition.