Ample empirical evidence endorses the role of associative learning in pain-related fear acquisition. Nevertheless, research typically focused on self-reported and psychophysiological measures of fear. Avoidance, which is overt behavior preventing the occurrence of an aversive (painful) stimulus, has been largely neglected so far. Therefore, we aimed to fill this gap and developed an operant conditioning procedure for pain-related avoidance behavior. Participants moved their arm to a target location using the HapticMaster (FCS Robotics; Moog Inc, East Aurora, New York), a 3 degrees-of-freedom, force-controlled robotic arm. Three movement trajectories led to the target location. If participants in the Experimental Group took the shortest/easiest trajectory, they always received a painful stimulus (T1 = 100% reinforcement; no resistance). If they deviated from this trajectory, the painful stimulus could be partly or totally prevented (T2 = 50% reinforcement; T3 = 0% reinforcement), but more effort was needed (T2 = moderate resistance and deviation; T3 = strongest resistance and largest deviation). The Yoked Group received the same reinforcement schedule irrespective of their own behavior. During the subsequent extinction phase, no painful stimuli were delivered. Self-reported pain-expectancy and pain-related fear were assessed, and avoidance behavior was operationalized as the maximal distance from the shortest trajectory. During acquisition, the Experimental Group reported more pain-related fear and pain-expectancy to T1 vs T2 vs T3 and deviated more from the shortest trajectory than the Yoked Group. During subsequent extinction, avoidance behavior, self-reported fear, and pain-expectancy decreased significantly, but conditioned differences persisted despite the absence of painful stimuli. To conclude, this operant learning task might provide a valid paradigm to study pain-related avoidance behavior in future studies.