A typical problem in Northeast China is that a large amount of surplus electricity has arisen owing to the serious photovoltaic power curtailment phenomenon. To effectively utilize the excess photovoltaic power, a hybrid energy system is proposed that uses surplus electricity to produce hydrogen in this paper. It combines solar energy, hydrogen production system, and Combined Cooling Heating and Power (CCHP) system to realize cooling, heating, power, and hydrogen generation. The system supplies energy for three public buildings in Dalian City, Liaoning Province, China, and the system configuration with the lowest unit energy cost (0.0615$/kWh) was obtained via optimization. Two comparison strategies were used to evaluate the hybrid energy system in terms of unit energy cost, annual total cost, fossil energy consumption, and carbon dioxide emissions. Subsequently, the annual total energy supply, typical daily loads, and cost of the optimized system were analyzed. In conclusion, the system is feasible for small area public buildings, and provides a solution to solve the phenomenon of photovoltaic power curtailment.