Fragmentation of aniline upon K-shell excitation/ionization has been studied by the electron impact method. Ions detected as dominant fragments were C3H3+, CHNH+/CNH2+, C3H2+, etc. The C3H3+ ion was produced characteristically at the N 1s edge. We found from the mass spectra of aniline-2,3,4,5,6-d5 that CD3+ is formed independent of excitation energy, suggesting that the aniline molecular cation isomerizes prior to dissociation. The mass spectra of the fragment ions by the direct dissociation of aniline were deduced by subtracting the contribution from the dissociation of the isomer, 4-methylpyridine. Enhancement of the C3H3+, CHNH+/CNH2+, and NH+ yields at the N 1s edge shows that the cleavage of the C1C2 bond of the initial benzene ring and the CN bond fission are likely to take place by the N 1s excitation and ionization.