The striatum has an essential role in neural control of instrumental behaviors by reinforcement learning. Adenosine A(2A) receptors (A(2A)Rs) are highly enriched in the striatopallidal neurons and are implicated in instrumental behavior control. However, the temporal importance of the A(2A)R signaling in relation to the reward and specific contributions of the striatopallidal A(2A)Rs in the dorsolateral striatum (DLS) and the dorsomedial striatum (DMS) to the control of instrumental learning are not defined. Here, we addressed temporal relationship and sufficiency of transient activation of optoA(2A)R signaling precisely at the time of the reward to the control of instrumental learning, using our newly developed rhodopsin-A2AR chimeras (optoA(2A)R). We demonstrated that transient light activation of optoA(2A)R signaling in the striatopallidal neurons in 'time-locked' manner with the reward delivery (but not random optoA(2A)R activation) was sufficient to change the animal's sensitivity to outcome devaluation without affecting the acquisition or extinction phases of instrumental learning. We further demonstrated that optogenetic activation of striatopallidal A(2A)R signaling in the DMS suppressed goal-directed behaviors, as focally genetic knockdown of striatopallidal A(2A)Rs in the DMS enhanced goal-directed behavior by the devaluation test. By contrast, optogenetic activation or focal AAV-Cre-mediated knockdown of striatopallidal A(2A)R in the DLS had relatively limited effects on instrumental learning. Thus, the striatopallidal A(2A)R signaling in the DMS exerts inhibitory and predominant control of goal-directed behavior by acting precisely at the time of reward, and may represent a therapeutic target to reverse abnormal habit formation that is associated with compulsive obsessive disorder and drug addiction.