Context. Some recent observations of the solar corona suggest that the heavy ions undergo an anisotropic (mainly across the magnetic field) and mass-dependent energization. Aims. In this work, we investigate the nonlinear interaction of heavy ions with kinetic Alfvén waves, in particular, their energization in the nonlinear kinetic Alfvén waves. Methods. Based on a three-component plasma model including electrons, protons, and heavy ions, a localized nonlinear structure of kinetic Alfvén wave is presented. In the nonlinear wave, the heavy ions are energized in the cross-field and field-aligned by the perpendicular polarization and the parallel acceleration of the wave electric field. Results. It is found that the ion cross-field energization depends on its mass and abundance in the same way that the velocity is proportional to the mass-charge ratio and decreases with the abundance ratio. On the other hand, the ion field-aligned energy is proportional to the charge, but is free of the mass and abundance. In the low abundance case (<10%), in particular, the minor heavy ions have strongly anisotropic temperature as well as are hotter and flow faster than protons. The resulting ion-proton temperature ratio is proportional to the mass number and the square of the mass-charge ratio, and the ion perpendicular-parallel temperature ratio is proportional to the cube of the mass-charge ratio. Conclusions. This anisotropic and mass-dependent energization mechanism by kinetic Alfvén waves for ions can be potentially important for understanding the microphysics of the energization of minor heavy ions observed in the solar corona.