The structural, electronic and elastic properties of solid nitromethane are investigated under pressure by performing first-principles density functional theory (DFT) calculations within the generalized gradient approximation (GGA) and the local density approximation (LDA). The obtained ground state structure properties are found to be consistent with existing experimental and theoretical results. The pressure-induced variations of structure parameters (a, b, c and V) indicate that the solid nitromethane has an anisotropic compressibility, and the compression along the c direction is more difficult than along a and b directions. From the vibration curves of intermolecular bond length and bond angle, we find that the C-N bond is the most sensitive among these bonds under pressure, suggesting that the C-N bonds may be broken first under external loading. The influence of pressure on the electronic properties of solid NM has been studied, indicating that solid NM is an insulating compound with a large indirect band gap and tends to be a semiconductor with increasing pressure. Finally, we predict the elastic constants and their pressure dependence for the solid NM with the bulk modulus, Young’s modulus, shear modulus and the Poisson’s ratio derived.