The strong CP problem is one of the unsolved problems in the Standard Model. The most plausible solution is the Peccei-Quinn (PQ) mechanism, which predicts a pseudo Nambu-Goldston boson, called QCD axion. The QCD axion is also well-known as a dark matter candidate. In this talk, we show how the QCD axion abundance can be altered in the presence of explicit PQ symmetry breaking, with the current bounds from the neutron EDM experiments satisfied. In addition, we also discuss the cosmological effects on the axionic isocurvature perturbation.