This paper presents an efficiency analysis, from both first law and second law of thermodynamics point of view, of a building HVAC system with on-site natural gas driven cogeneration energy system. The building used for the case study is a university teaching and research complex located in Miami, Florida. The building's original service centrifugal chiller plant and natural gas boiler are compared with the proposed cogeneration system based on energy and exergy performance. Because of the complexity of the system configuration and control schemes, building energy simulation code EnergyPlus is used as the primary tool to solve the energy balance equations. Further mathematical model for individual process exergy destruction, i.e. space cooling, dehumidification, VAV box reheating, mechanical ventilation, cooling tower evaporation, etc. are developed. To address both the processes of space cooling and dehumidification, the reference state which is associated with ambient temperature and humidity ratio is used throughout the analysis. The simulation results meet well with on-site measurement of energy usage. It is found that at whole system level, exergy efficiency is generally much lower than that of energy. The performance of chiller plant, natural boiler, air handling unit is far from thermodynamic ideal operation. By comparing different chiller plant modification scenarios, the cogeneration energy system with centrifugal chillers demonstrate the ability to increase both energy and exergy efficiencies for the overall system. The system with single-effect absorption chiller exergy efficiency is the lowest among all the candidate scenarios. The implication between exergy efficiency and sustainable building is discussed. To further improve the exergy efficiency, low exergy resources such as geothermal and solar heating should be used.