The effects of lattice distortion on magnetocrystalline anisotropy in α″-Fe16N2 was studied by first-principles calculations. We found that local distortion of the Fe lattice induced by interstitial N atoms is a key factor for realizing uniaxial magnetic anisotropy in α″-Fe16N2 systems. If the local distortion disappears, the uniaxial anisotropy constant K u becomes nearly zero even though there is global distortion with an axial ratio c/a = 1.1. We also discuss one possibility that the random distribution of N atoms suppresses the local distortion effect and the uniaxial magnetic anisotropy in FeN for the α′ phase and martensite phase.