A dog hacking, coughing, and spitting up can be alarming, especially when it seems to come out of nowhere.
We outline the common causes of a dog hacking cough and spitting up, what you can do at home, and when to seek veterinary help.
Table of Contents
Dog Hacking Cough and Spitting Up: Why It Happens
A dog hacking cough and spitting up can happen when the throat or airways are irritated, inflamed, or affected by an underlying respiratory or digestive issue.
This combination may occur with mild problems like allergies or throat irritation, but it can also be linked to infections, tracheal sensitivity, gastrointestinal upset, or conditions that cause coughing severe enough to trigger regurgitation.
Monitoring how often it happens and noting any additional symptoms can help determine whether your dog needs veterinary evaluation.
Dog Hacking Cough and Spitting Up: Common Causes
Tracheal Collapse
Tracheal collapse is a chronic condition where the windpipe loses rigidity and narrows, making it difficult for air to pass through.
This narrowing triggers a dry, hacking cough that becomes worse during excitement, pulling on the leash, drinking water, or breathing in warm air.
Because the airway is irritated, dogs with tracheal collapse often gag or spit up white foam immediately after a coughing episode.
Over time, the repeated coughing spells can cause inflammation, swelling, and more frequent spitting up. Small breeds such as Yorkies, Pomeranians, Chihuahuas, and Maltese are especially prone to the condition.
As tracheal collapse worsens, dogs may start coughing even at rest, and spitting up becomes more common because of the persistent throat irritation.
Related: Dog has hacking cough with white foam (What It means)
Kennel Cough
Kennel cough is one of the most well-known causes of hacking cough in dogs. This highly contagious respiratory infection irritates the trachea, causing that classic “goose honk” sound.
Dogs often cough so forcefully that they gag or spit up white foam or mucus afterward.
This spitting up is usually not true vomiting—it’s caused by throat irritation and airway spasms triggered by the cough.
Dogs with kennel cough may still act normal, eat well, and have normal energy levels, but the cough can persist day and night. While mild cases can improve at home, infections involving Bordetella or canine influenza can worsen, especially in puppies, senior dogs, or dogs with weakened immune systems.
These more severe cases may produce thicker mucus, increased spitting up, fever, or lethargy.
Foreign Object in the Throat or Airway
A small piece of food, a stick, a toy, or even grass can irritate the throat or partially block the airway.
Dogs respond instinctively by hacking, gagging, or coughing to try and dislodge the object.
During these forceful coughing attempts, they may spit up frothy saliva, mucus, or small bits of the object they are trying to clear.
Foreign objects can be extremely dangerous if they migrate lower into the airway or become lodged. Symptoms can escalate quickly, leading to distressed breathing, continuous coughing, drooling, pawing at the mouth, or panic-like behavior.
Even after the object is expelled, dogs may continue hacking and spitting up for hours due to residual irritation.
Reverse Sneezing With Post-Episode Spitting Up
Reverse sneezing causes dogs to make rapid, snorting inhalations due to soft palate irritation or nasal passage inflammation.
While reverse sneezing itself isn’t dangerous, some dogs hack or gag at the end of the episode. This can cause them to spit up foamy saliva or mucus, especially if the throat muscles spasmed during the episode.
These events often occur after drinking, eating, excitement, pulling on the leash, or encountering allergens like dust or perfume.
Although typically harmless, frequent reverse sneezing accompanied by hacking and spitting up may indicate underlying irritation from nasal mites, allergies, or mild upper-airway inflammation.
Acid Reflux
Acid reflux occurs when stomach acid travels back up into the esophagus, irritating its lining. Dogs with reflux may cough or hack because the acid causes burning in the throat.
This irritation can lead to gagging, swallowing repeatedly, and spitting up small amounts of foamy liquid or bile—especially at night or after eating.
Over time, reflux can cause chronic throat inflammation, resulting in a persistent cough that worsens after drinking water, running, or waking up from sleep.
Dogs with reflux may also have bad breath, lip-smacking, decreased appetite, or discomfort when lying down.
If untreated, the inflammation can become severe enough to mimic respiratory disease.
Heart Disease
Heart disease can cause fluid accumulation around the lungs or in the airway, triggering a chronic hacking cough. When fluid builds up, dogs attempt to clear it by coughing, which can lead to spitting up frothy white fluid or mucus.
This spitting up is often mistaken for vomiting, but it is actually caused by pulmonary congestion.
Dogs with heart-related cough may show additional symptoms such as nighttime coughing, decreased stamina, heavy breathing, or reluctance to exercise.
As the disease progresses, coughing fits become more frequent and the spitting up episodes can increase because the airways are consistently irritated by fluid.
Canine Influenza or Pneumonia
Both canine influenza and pneumonia can cause significant airway and lung inflammation. Dogs with these infections typically have a wet, productive cough that may cause them to spit up mucus, phlegm, or foam.
Because the lower respiratory system is involved, these dogs often appear visibly unwell—with fever, lethargy, poor appetite, and rapid or heavy breathing.
Pneumonia in particular can produce thick, colored mucus that a dog may cough up. The inflammation irritates the throat and lungs, making the cough deeper and more forceful.
These conditions require veterinary treatment because they can worsen quickly and lead to dangerous breathing difficulties.
Allergies
Airborne irritants such as dust, mold, perfumes, cigarette smoke, cleaning sprays, and seasonal pollen can trigger coughing and hacking in sensitive dogs.
The irritation may cause the dog to gag or swallow excessively, sometimes leading to spitting up foamy saliva.
These symptoms often worsen in specific environments—for example, indoors with poor air circulation or outdoors during heavy pollen seasons.
Chronic exposure to irritants inflames the respiratory lining, making dogs more sensitive to even small particles.
Over time, the hacking cough may become persistent, and spitting up can occur after longer coughing episodes triggered by the irritation.
Related: Dog constantly hacking (Why it happens)
What You Can Do at Home
Use a humidifier in the room where your dog sleeps to ease throat irritation.
Switch to a harness to reduce pressure on the trachea if coughing worsens on walks.
Keep them away from smoke, dust, perfumes, and cleaning sprays.
Offer small, frequent meals if reflux is suspected.
Ensure they stay hydrated, especially if they are spitting up fluid.
Provide a calm environment and limit intense activity until the cough improves.
If symptoms worsen, persist longer than a few days, or if the dog’s breathing becomes noisy or labored, veterinary care is needed.
When to Call or Visit the Vet
Call your vet promptly if you notice:
Spitting up pink foam or blood.
Difficulty breathing, wheezing, or open-mouth breathing.
Continuous hacking that does not stop.
Weakness, collapse, or extreme lethargy.
A suspected foreign object.
Cough lasting more than 3–5 days.
Signs of heart disease (swollen belly, fainting, nighttime coughing)
Thick yellow or green mucus, which may indicate pneumonia
Related: Dog hacking cough and drooling (Should you worry?)
Key Takeaway
A dog hacking cough combined with spitting up often signals irritation in either the airway or the digestive tract, but it can also point to more serious issues like infections, foreign objects, pneumonia, or heart disease.
Paying close attention to when the symptoms occur—and how severe they are—can help you determine how quickly your dog needs veterinary support.
Early evaluation gives your dog the best chance of a fast, smooth recovery, especially when coughing and spitting up happen together.
