The hydrogen oxygen fuel cell is a power source with significant potential for development. The air compressor provides ample oxygen for the fuel cell, and as a key component of the air compressor, the performance of the motor greatly impacts the efficiency of the fuel cell. In order to enhance the system performance of high-speed permanent magnet motors, optimization was conducted on the motor’s geometric dimensions to minimize rotor loss and maximize power density, taking into account the comprehensive constraints of electromagnetic and mechanical properties. The finite-element method was employed to analyze the motor’s performance, conducting a multi-physical field analysis that included electromagnetic field, rotor loss, and mechanical strength analysis, as well as temperature field analysis. Aiming at the problem of high temperature rise in high-speed motor winding, the influence of the cooling water flow rate on the winding temperature rise was analyzed and simulated. Based on the analysis results, the minimum cooling water flow rate was obtained. According to the optimized design results, a prototype of an 18 kW, 100,000 rpm motor was manufactured, and the efficiency and temperature rise were tested. The experimental results verify the correctness and effectiveness of the optimal design.