The energy eigenvalues and the corresponding eigenfunctions of the one-dimensional Klein-Gordon equation with q-parameter Poschl-Teller potential are analytically obtained within the position-dependent mass formalism. The parametric generalization of the Nikiforov-Uvarov method is used in the calculations by choosing a mass distribution.