The effects of pressure on the crystal structure, elastic properties, and electronic characteristics of Al
4In
2N
6 are systematically studied using first-principles density functional theory. The lattice constants of Al
4In
2N
6 decrease with the increase of pressure, exhibiting anisotropic compression with greater compressibility along the
c-axis. In terms of mechanical properties, the bulk modulus increases with the increase of pressure, indicating enhanced compressive resistance. Notably, the Vickers hardness decreases with the increase of pressure, indicating that high pressure can induce plastic deformation in Al
4In
2N
6. The calculations of elastic constants and phonon spectra confirm that Al
4In
2N
6 retains mechanical and dynamical stability in the pressure range of 0–30 GPa. Electronic structure calculations reveal that Al
4In
2N
6 possesses a direct band gap, and non-overlapping conduction and valence bands at the Fermi level. The conduction band has a higher carrier mobility than the valence band. The band gap increases almost linearly with pressure rising from 3.35 eV at 0 GPa to 4.24 eV at 30 GPa, demonstrating significant pressure-induced modulation of the electronic structure. Furthermore, the analysis of differential charge densities reveals that increasing pressure can strengthen the Al-N and In-N bonds in Al
4In
2N
6 through shortened interatomic distances and stronger atomic interactions, increasing its compression resistance. In summary, this study not only deepens our understanding of the high-pressure properties of Al
4In
2N
6 but also provides theoretical guidance for its application in UV optoelectronics. Pressure-driven modulation of its mechanical and electronic characteristics highlights its potential in efficient high-pressure optoelectronic devices and materials.