The aim of this study was to reveal the effects of anxiety and depression on pain perception in the emergency setting. This randomized prospective study was performed in an urban tertiary care hospital emergency department (ED). Consecutive patients presenting to the ED with pain who had an intramuscular injection of diclofenac sodium were enrolled in the study. The prevalence of anxiety and depressive disorders in study subjects was determined by using the Hospital Anxiety and Depression Scale. A total of 302 patients were included. Study subjects had a mean age of 41.3 ± 13.7 years and 35.4% (n = 107) were male. Pain perception in women was significantly higher than in men (median 8.5 vs. 5, respectively;p= .033). Pain perception in elderly patients, ≥65 years old, was found to be lower than in patients <65 years old (median 1 vs. 6.5, respectively;p= .02). Anxiety was found to be related to higher pain perception after adjusting for confounding variables (13.8 vs. 7.6, respectively; adjustedp= .022). Gender, age, and anxiety, but not depression, are possible factors related to pain perception in the emergency setting. Further studies are needed to reveal the factors affecting pain perception and the complex relationship between psychiatric status and pain.