Background: Magnetic dipole (M1) excitation is the leading mode of nuclear excitation by the magnetic field, which couples unnatural-parity states. Since the M1 excitation occurs mainly for open-shell nuclei, the nuclear pairing effect is expected to play a role. As expected from the form of operator, this mode may provide the information on the spin-related properties, including the spin component of dineutron and diproton correlations. In general, the sum rule for M1 transition strength has not been derived yet. Purpose: To investigate the M1 excitation of the systems with two valence nucleons above the closed-shell core, with pairing correlation included, and to establish the M1 sum rule that could be used to validate theoretical and experimental approaches. Possibility to utilize the M1 excitation as a tool to investigate the pairing correlation in medium is also discussed. Method: Three-body model, which consists of a rigid spherical core and two valence nucleons, is employed. Interactions for its two-body subsystems are phenomenologically determined in order to reproduce the two-body and three-body energies. We also derive the M1 sum rule within this three-body picture. Conclusion: The introduced M1 sum rule can be utilized as a benchmark for model calculations of M1 transitions in the systems with two valence nucleons. The total sum of the M1 transition strength is related with the coupled spin of valence nucleons in the open shell, where the pairing correlation is unnegligible. The three-body-model calculations for 18 O, 18 Ne, and 42 Ca nuclei demonstrate a significant effect of the pairing correlations on the low-lying M1 transitions. Therefore, further experimental studies of M1 transitions in those systems are on demand, in order to validate proposed sum rule, provide a suitable probe for the nuclear pairing in medium, as well as to optimize the pairing models.