AbstractSolving many‐objective optimization problems (MaOPs) by means of evolutionary algorithms obtains considerable attention in the community of evolutionary computation. However, it is a difficult task to effectively handle MaOPs with both regular and irregular Pareto front (PF) shapes. In this paper, a novel two reference vector sets based evolutionary algorithm, referred to as TVEA, is proposed to solve both types of MaOPs. TVEA can be featured as i) two independent reference vector sets are used, where the regular reference vector set is used for the regular PF MaOPs and the irregular one is used for the irregular PF MaOPs; ii) according to the two reference vector sets, TVEA automatically detects the PF shape of a MaOP at hand; iii) a new delete‐and‐add strategy is proposed to adaptively update the irregular reference vector set; iv) a novel environmental selection strategy is developed to handle the irregular PF MaOPs. TVEA is extensively evaluated on 23 benchmark MaOPs with both regular and irregular PF shapes. The results indicate that TVEA can correctly detect the PF shape of MaOPs to be solved. Compared with other state‐of‐the‐art algorithms, TVEA obtains better or at least competitive results on both types of MaOPs.