The global drive for sustainable development and carbon neutrality has heightened the need for energy-efficient buildings. Photovoltaic buildings, which aim to reduce energy consumption and carbon emissions, play a crucial role in this effort. However, the potential of the building envelope for electricity generation is often underutilized. This study introduces an efficient hybrid method that integrates Particle Swarm Optimization (PSO), Support Vector Machine (SVM), Non-dominated Sorting Genetic Algorithm II (NSGA-II), and the weighted Technique for Order Preference by Similarity to an Ideal Solution (TOPSIS) method. This integrated approach was used to optimize the external envelope structure and photovoltaic components, leading to significant reductions: overall energy consumption decreased by 41% (from 105 kWh/m2 to 63 kWh/m2), carbon emissions by 34% (from 13,307 tCO2eq to 8817 tCO2eq), and retrofit and operating costs by 20% (from CNY 13.12 million to CNY 10.53 million) over a 25-year period. Sensitivity analysis further revealed that the window-to-wall ratio and photovoltaic windows play crucial roles in these outcomes, highlighting their potential to enhance building energy performance. These results confirm the feasibility of achieving substantial energy savings and emission reductions through this optimized design approach.