A fixture is a crucial component in the car dashboard manufacturing system and is used to position and restrain the car dashboard under external forces. However, the conventional fixture is only suitable for a specific type of car dashboard, which has poor adaptability. To this end, a new flexible fixture based on the N- X locating principle is proposed in this paper to adapt to different types of car dashboards. In the presented fixture, N clamping elements clamp the dashboard edge, while X movable supporting elements support the area close to the tool along the machining path. Furthermore, the fixture layout is optimized by combining a genetic algorithm (GA) and finite element analysis (FEA). In the optimization program, a multi-objective optimization function is established to suppress the deformation of the car dashboard. FEA is applied to calculate the machining deformation. The optimal locations of the fixture elements are determined by GA. A case is implemented to validate the proposed method and the results show that the maximum deformation and average deformation are reduced by 53.8% and 40%, respectively, compared with the empirical method.