The high-pressure behavior of amorphous aluminum nitride is investigated for the first time by means of ab initio molecular dynamics simulations. It is found to undergo two successive first-order phase transformations with the application of pressure. The first one is a polyamorphic phase transition in which the low-density amorphous phase transforms into a high-density amorphous phase having an average coordination number of about 4.6. The high-density amorphous structure transforms back to a low-coordinated amorphous network upon pressure release but its density is higher than that of the original low-density amorphous phase. The second phase change is the crystallization of the high-density amorphous state into a rocksalt structure. A careful analysis suggests that the hexagonal-like nanoclusters presented in amorphous aluminum nitride prevent the formation of a very dense amorphous phase (about sixfold coordinated) during the first phase transition and they act as a nucleation center for the crystallization process.