We derive cosmological constraints from the redshift dependence of the Alcock-Paczynski (AP) effect. The apparent anisotropy in the observed galaxies arise from two main sources: the RSD effect due to the galaxy peculiar velocities, and the AP effect which is the geometric distortion when incorrect cosmological models are assumed for transforming redshift to comoving distance. Anisotropies produced by the RSD effect are, although large, maintaining a nearly uniform pattern over a large range of redshift, while the degree of anisotropies from the AP effect varies with redshift significantly. We test our method on HR 3 N-boday simulations and apply it to the SDSS-III BOSS survey. We split the BOSS DR12 galaxies into six redshift bins, measure the 2-point correlation function in each bin, and assess its redshift evolution. We get tight cosmological constraints comparable to the other cosmological probes of SNIa, CMB, BAO. Combining them with our method yi eld tight constraints of Ωm = 0.301 ± 0.006, w = -1.054 ± 0.025. We expect our method will play an important role in deriving cosmological constraints from large scale structure surveys.