Although it's not common, some people seem to cough more than usual soon after stopping smoking. The cough is usually temporary and might actually be a sign that your body is starting to heal.
Tobacco smoke slows the normal movement of the microscopic hairs (cilia) that line your lungs. When you stop smoking, the cilia become active again. As the cilia recover and the mucus is cleared from your lungs, you might cough more than usual -- perhaps for several weeks. In addition to reduced cough, most other respiratory symptoms, such as phlegm (mucus) production and shortness of breath, continue to improve for up to a year after stopping cigarette smoking.
In the meantime, you can speed the process by staying well-hydrated. Drink plenty of fluids, such as water and juice. You might also increase the humidity in the air with a humidifier or vaporizer.
Consult your doctor if the coughing lasts more than a month or you cough blood.