The class-selective molecular-imprinted polymers (MIPs) have shown the recognition ability to multiple targeted molecules through using one or multiple templates. However, choosing the right templates, the core problem, still lacks a systemic guide and decision-making. In this work, we propose a strategy of selecting templates through expanding the recognition width for the improvement of class-selectivity. First, three families of genotoxic impurity (GTI) were selected as model objects, and the spatial size and binding energy of each GTI-monomer complexes were obtained and compared by computational simulation. The two indexes of energy width (W E ) and size width (W L ) were introduced to compare the similarity and differences on the two recognition factors, binding strength and spatial size, among these GTIs in each family. Through shortening the width to increase similarity on binding energy and size, the dual templates in the aromatic amines (AI) family and sulfonic acid esters (SI) family were successfully selected. Correspondingly, the prepared dual-template MIPs in the two GTI families can simultaneously recognize all the GTIs comparing with that of single template MIP, respectively. Meanwhile, through comparing the adsorption capacity of the selected template and its analogues in one GTI family, the recognition efficiency of the dual-template MIPs was higher than that of the single-template MIP. This indicates that though using the selected right templates, the higher class-selectivity and the larger recognition width can be realized. Thus, this work can solve the problem of blind template selection, and provide the useful theoretical guidance for designing family-selective molecular imprinting.