The precise control of both the mechanical deformation and wave propagation characteristics of metamaterial through design holds significant importance and presents a challenging task. This paper proposes a novel two-stage topological optimization design method for customizing both negative Poisson's ratio and locally resonant bandgap in the mechanical metamaterial. In the optimized model, the negative Poisson’s ratio structure is firstly obtained by optimizing the material distribution within the matrix region, then the metamaterial with the customized negative Poisson’s ratio and bandgap range is obtained through the second stage optimization. In the analysis of the metamaterial unit cell, the topology-dependent Poisson’s ratio is calculated based on the equivalent elastic matrix obtained through the homogenization method. The range of bandgap is estimated using the effective mass analytical model of the spring-mass system. Thus, the range of bandgap is determined by only a few geometric parameters instead of topological structure under given assumptions. The customized bandgap ranges can be extended by introducing more resonators into the unit cell and combining different unit cells into an assembled structure. Numerical examples are provided to demonstrate the efficacy of the proposed method.