Whooping cough is caused by a certain type of bacteria. These bacteria attach to the cilia that line part of the upper respiratory system. The bacteria release poisons known as toxins.