Reducing the weight of the legged robot improves its endurance, maneuverability, and carrying capacity, enabling it to perform more complex tasks, such as transitioning from walking on flat terrain to executing challenging jumps. As the core energy source of a hydraulic legged robot, the weight of hydraulic power unit (HPU) accounts for more than 50% of the entire robot, offering significant potential for weight reduction. However, the design and sizeing parameters of the HPU are complex, and the key factors influencing its weight are not fully unclear, making targeted optimization challenging. To solve the above problems, this paper designs a lightweight hydraulic power unit (LHPU) for the legged robot based on the Sobol sensitivity analysis method. First, a weight model for the LHPU's key components is established, and the key parameters influencing its weight are determined using the Sobol sensitivity analysis method. Then, key parameters matching is optimized for the motor-pump, and design improvements are made to components like the low-pressure tank, filter, and integrated block. Finally, the LHPU is tested for static and dynamic characteristics. The findings demonstrate that the LHPU can stabilize the required pressure and flow outputs for the legged robot and achieve a weight reduction exceeding 40%. This research offers significant insights for the lightweight design of advanced mobile systems, enhancing energy efficiency, mobility, and load capacity.