I will present new ideas about how the QCD axion or axion-like particles can make up the dark matter of our universe, and/or explain the origin of the primordial density perturbation. For axion dark matter, I will introduce a novel production mechanism that invokes a kinetic mixing between the axion and the inflaton. I will show that this mechanism opens up new windows in the axion parameter space, where conventional scenarios such as vacuum misalignment cannot work. The impact of primordial electromagnetic fields on the axion window will also be discussed. For the density perturbation, I will demonstrate that an axion-like particle coupled to a new confining gauge group is a perfect candidate of a curvaton, and that the resulting density perturbation has distinct signatures that are testable in upcoming experiments.