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 tiny hairs (cilia) that move mucus out of 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. However, cough and most other respiratory symptoms, such as 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, tea and juice. Taking a couple of teaspoons of honey at bedtime and increasing the humidity in the air with a humidifier or vaporizer — particularly in cold weather — might also help. But there's no reason to suppress a cough with medicines unless it affects your sleep or causes extreme discomfort.
Consult your doctor if the coughing lasts more than a month or you cough blood.