Structural transformation in gallium arsenide nanocrystals under pressure is studied using molecular-dynamics simulations on parallel computers. It is found that the transformation from fourfold to sixfold coordination is nucleated on the nanocrystal surface and proceeds inwards with increasing pressure. Inequivalent nucleation of the high-pressure phase at different sites leads to inhomogeneous deformation of the nanocrystal. This results in the transformed nanocrystal having grains of different orientations separated by grain boundaries. A new method based on microscopic transition paths is introduced to uniquely characterize grains and deformations.