Fragmentation of the pyridine ring upon K-shell excitation/ionization has been studied with gaseous 2-, 3- and 4-methylpyridine by the electron-impact method. Ab initio molecular orbital (MO) calculations were also carried out to explore electronic states correlating with specific fragments. Some specific fragmentation channels were identified from the ionic fragments enhanced characteristically at the N 1s edge. Yields of the C(2)HN(+) and C(5)H(5)(+)/C(5)H(6)(+) ions show that the fission of the N-C2 and C4-C5/C5-C6 bonds of the ring is likely to occur after the N 1s excitation and ionization. Ab initio MO calculations for the 2-methylpyridine molecule indicate that the dissociation channels to produce these ions are only accessible through the excited states of the parent molecular dication, which can be formed by Auger decays after the N 1s ionization. Fragment ions via hydrogen rearrangement are produced as well, but the rearrangement is not a phenomenon specific to the K-shell excitation/ionization.