The blended blade and endwall (BBEW) contouring technology can adjust the dihedral angle between suction surface and endwall, thus reducing corner separation in compressors. Generally, the design of BBEW relies on the experiences, the effective design results may not be the optimal result. In this paper, an optimization approach based on the genetic algorithm (GA) for feature selection and parameter optimization of support vector machine (SVM) is used to obtain the optimal BBEW parameters in a compressor cascade. Based on the sensitivity analysis of the results, it is found that the maximum blended width and the axial position of the maximum blended width are the two most important design parameters. The experimental results show that the optimal BBEW cascade can stretch the spanwise area of the high loss region, and reduce the maximum value in it. The numerical studies were conducted to analyze the flow mechanism. It is shown that the BBEW cascade has a transverse pressure difference at the axial position of the maximum blended width, and magnitude of the pressure difference in proportion to the maximum blended width. The transverse pressure difference removes the low-energy fluid from the corner to the main flow, thus improving the corner separation.