The structural, electronic, mechanical and optical properties of MgGeN2 under uniaxial compression are computationally investigated with density functional theory calculations. When the uniaxial compression is along [010] and [001] directions, there is no phase transition. For uniaxial compression along [100] direction, a phase transition is observed from orthorhombic to Pnma phase at 40 GPa. The resulting Pnma structure is in a vertically stacking graphene‐like structure. Moreover, the electronic structure and mechanical moduli show anisotropic for uniaxial compression in the [100], [010], and [001] directions. The bulk modulus monotonically increases and the shear modulus decreases for uniaxial compression in the [001] direction, while the bulk modulus goes to a maximum followed by a drop, and the shear modulus continuously decreases for uniaxial compression in the [010] and [100] directions. As phase transition occurs, both the bulk and shear moduli dramatically increase. The bandgap basically shows a monotonic increase and then gives a drop after arriving at a maximum. For compression in the [100] direction, the bandgap gives a more rapid increase near critical pressure. In addition, the light absorption decreases upon the uniaxial compressions. Therefore, uniaxial compression can be utilized to modulate the properties of MgGeN2 and help to widen its applications.