It was known that isocurvature perturbation of a nearly massless cosmological axion field can lead to rotation of E-mode polarization into B-mode polarization in the cosmic microwave background (CMB) by the presence of a parity violating coupling of the field to the topological density of electromagnetism, resulting in a phenomenon known as anisotropic cosmic birefringence. In this Letter, we propose a new source of anisotropic cosmic birefringence induced by dark matter adiabatic density perturbation. If dark matter is ultralight axions that carry a coupling to photon, its adiabatic density fluctuations will induce anisotropic cosmic birefringence with a blue-tilted rotation power spectrum, thus generating CMB B-mode polarization on sub-degree angular scales. Using current POLARBEAR and SPTPol B-mode polarization data, we derive a constraint on the axion–photon coupling strength (β) and the axion mass (m), β2(10−22eV∕m)2<8×1015. It is shown that the birefringence B modes can dominate over CMB lensing B modes at high l, manifesting as an excess power for l>1500 in future CMB lensing B-mode searches. In addition, we derive the lensing–rotation cross correlation that can be a potential test to the present model.