Abstract We report a new survey of the 12.2 GHz Class II methanol masers toward a sample of 367 sources with the 6.7 GHz methanol masers conducted with the Shanghai 65 m Tianma Radio Telescope. This sample has been previously made with observations of the radio continuum emission of UC H ii regions by the VLA. A total of 176 sources were detected with the 12.2 GHz methanol maser, with a detection rate of 48%, including 8 new detections. A lower detection rate (<10%) was determined toward the sources in the Galactic longitude ranges of 60°–180°, revealing that the physical environments from those sources in the Local arm or the tails of Galactic arms do not easily excite the 12.2 GHz masers. In addition, two detections of highly excited-state OH masers at the 13.4 GHz transition were made, one of which is a new detection. Compared to previous surveys, one-third of the detected 12.2 GHz masers show considerable flux variations, implying the possible changes of their physical environments associated with variable radiation fields from their host high-mass young stellar objects. A positive log–log correlation is found between the luminosities of the 6.7 and 12.2 GHz masers in our observed sample, suggesting that both the transition masers have similar excitation conditions. The statistical analysis for the relationships between the methanol maser luminosity and UC H ii region spatial size indicates that the maser luminosities of both the 6.7 and 12.2 GHz transitions have a decreasing trend with the spatial sizes of the associated UC H ii regions, indicating that the Class II methanol masers might fade away with the H ii region evolution.