Nocebo hyperalgesia is characterized by a pain increase following an inactive intervention. Existing research on the mechanisms of nocebo effects has predominantly centered around the role of cognitive processes, leaving emotional processes relatively understudied. A recently proposed theoretical model on the role of negative emotions in the development of placebo effects in pain suggests that heightened anxiety may enhance nocebo hyperalgesia. The objective of the present study is to investigate the impact of pretreatment and posttreatment anxiety on the magnitude of nocebo hyperalgesia induced through classical conditioning. Healthy volunteers (N=120) were randomized to one of three groups: 1) classical conditioning of nocebo hyperalgesia preceded by anxiety induction (ANC); 2) classical conditioning of nocebo hyperalgesia (NC); and 3) no-manipulation control (CTRL). Anxiety was induced by the anticipation of an electric shock. During the conditioning, a placebo was paired with high-intensity heat pain stimuli, while moderate-intensity heat pain stimuli were provided without a placebo. Pretreatment anxiety disrupted the formation of nocebo hyperalgesia: although nocebo hyperalgesia was found in the NC group, no effect was observed in the ANC group. Nocebo conditioning changed the pain-related expectancies in the NC group: participants expected more pain than the CTRL group. Nocebo conditioning did not cause the development of posttreatment anxiety. Neither pain-related expectancies nor posttreatment anxiety mediated nocebo hyperalgesia. Because pretreatment anxiety influenced the formation of nocebo hyperalgesia, healthcare workers may consider patients’ anxiety level when treating pain as it may predict treatment responses.