Terrorism causes emotional reactions among public audiences, with downstream consequences for their well-being, attitudes and policy preferences. We utilise a novel approach which harnesses a unique dataset of Twitter activity from 324K users to precisely capture emotional responses to terrorism. Our results demonstrate that terrorist attacks induce dramatic spikes in various discrete emotions of a negative valence, which vary based on the characteristics of the attacks. Furthermore, we show that the terrorism-induced effects on emotions are accompanied by changes in feelings about immigration.