The hypothesis that brain dopamine is involved in affect has been questioned by many investigators. However, there appear to be distinct affective processes, and the mesocorticolimbic dopamine system does not appear to mediate sensory pleasures such as hedonic taste, but the positive affect associated with the anticipation of rewards. Here we investigate affective effects of the stimulation and inhibition of midbrain dopamine neurons in mice, using the optogenetic technology. TH-Cre mice received Cre-specific viral vector constructs with either channelrhodopsin or halorhodopsin into the ventral tegmental area (VTA). First, we found that mice quickly learned to respond on the active lever that stimulated dopamine neurons with a 473 nm light (15 pulses at the rate of 20 Hz), but not on the inactive lever that did not stimulate neurons. Responding was so robust that mice lever-pressed 1486 times in a 30-min session for VTA stimulation (N = 8). The mice quickly extinguished lever-pressing when stimulation was terminated, and reversed lever preference between the two levers when the assignment of the active and inactive levers was reversed. Second, we examined affective effects of the stimulation and inhibition of dopamine neurons using a place preference procedure in which light was delivered continuously when the mouse chose to stay in one compartment of a chamber, while light was discontinued when in the other. Mice exhibited clear preference to light compartment over non-light compartment (1372 sec vs. 239 sec) when light (15 pulses/sec) stimulated VTA dopamine neurons. Mice preferred non-light compartment over light compartment (1372 sec vs. 196 sec), when light (continuous 532 nm light) inhibited VTA dopamine neurons. Moreover, when the assignment of light and non-light compartments was reversed, mice quickly reversed preference. These observations support the view that the stimulation of dopamine neurons elicits a positive affective state, while the inhibition of dopamine neurons elicits a negative affective state.