Competition can influence performance, however, the underlying psychological and physiological mechanisms are poorly understood. To address this issue we tested mechanisms underlying the competition–performance relationship. Measures of anxiety, effort, enjoyment, autonomic activity and muscle activity were obtained from 94 participants during a handgrip endurance task completed in individual and competition conditions. Competition improved endurance performance, increased anxiety, effort, enjoyment, heart rate and muscle activity, and decreased heart rate variability, R-wave to pulse interval and pulse amplitude. Enjoyment fully mediated whereas effort and heart rate variability partially mediated the effects of competition on performance. In addition, anxiety moderated the competition–performance relationship; those with lower anxiety performed better in competition. We confirm that competition elicits effects on performance through psychological and physiological pathways, and identify mechanisms that underlie improved endurance performance during competition.