High-temperature superconducting maglev technology has great application potential in rail transit applications due to its advantages such as passive stable levitation and green environmental protection. As one of the key components of the HTS maglev system, the Halbach-type permanent magnet guideway (PMG) enhances the magnetic field on one side of the guideway and weakens that on the other side. Optimizing the PMG, including the geometry and magnetic properties of the magnet, is an effective method to improve the levitation and guidance performance of the system. In addition, since NdFeB permanent magnets are expensive, optimizing the design of the PMG for the HTS maglev system is also an important work to reduce the application cost. In this paper, the Nelder–Mead Simplex method (NMS) in the optimization solver in COMSOL software is used to optimize the geometric parameters of the Halbach PMG according to the different objective requirements of the HTS maglev system. The optimization objectives include the maximum levitation force and guidance force under the constraint of the maximum cross-sectional area of the PMG, as well as the minimum cross-sectional area of the PMG with a minimum levitation force constraint. The results indicate that the NMS method is effective. By comparing four PMGs during the optimization process, it is found that this method can fully improve the utilization of the magnetic field by changing the geometric parameters of the Halbach PMG. This study can provide a valuable reference for the optimal design of the PMG for HTS maglev systems in the future.