Gas phase complexes Mg center dot+(2,6- difluoropyridine) (1) and Mg center dot+(pentafluoropyridine) (2) have been subjected to photodissociation in the spectral range of similar to 230-440 nm. Except for the evaporative photofragment Mg center dot+, the primary photoproduct for 1 is C5H3N center dot+, which is associated with the rupture of two C-F bonds by the photoexcited Mg center dot+, forming very stable MgF2. In contrast, the direct loss of MgF+ is more favorable for 2 due to fluorine substitution. Given enough energy, C5H3N center dot+ can undergo decomposition to form C4H2 center dot+ and HCN. These results are very different from those for Mg center dot+(2-fluoropyridine), highlighting the significance of the additional F at C6 of 1 and 2. Density functional theory (DFT) calculations have been employed to examine the geometries and energetics of the complexes as well as relevant reaction mechanisms. All of the complexes feature the direct attachment of Mg center dot+ to the N atom. The key intermediate is found to be FMg+(C5HxF4-xN) (x = 3 or 0), which can lead to the formation of MgF+ directly or MgF2 through activation of another C-F bond adjacent to N, producing the pyridyne radical cations. However, hydrogen-transfer prior to the rupture of the second C-F bond followed by ring-opening of C5H3N center dot+ may result in the formation of chain forms of C5H3N center dot+. The influence of the fluorine substitution on the competition of the two routes have been demonstrated.