Buildings account for more than one-third of the global primary energy consumption and are responsible for most of the global greenhouse gas emission. As one of the infrastructures of buildings, energy systems are crucial to control overall energy consumption and associated emissions. Despite much consideration on improving the efficiency of buildings energy system and the utilization of renewable energy, there has been little discussion on the carbon footprint quantification of building distributed energy systems as well as the reduction potentiality. In such a context, this paper proposed a life cycle economic and carbon emissions assessment framework by dividing the building distributed energy system into five stages. Subsequently, a multiobjective mathematical model is developed with minimal life cycle cost and carbon footprint, while respecting energy balance and technical constraints, and the optimal energy system and the carbon footprint distribution are obtained by solving the model. Finally, a case study is conducted on the building energy system design in a district in Xuzhou to test the effectiveness of this method. The correlation between optimal energy system carbon footprint by facility attributes, and the distribution of energy system carbon footprint by stage and source are investigated. It's found that the carbon emissions in the operation and maintenance stage accounts for the largest share in the entire life cycle. In addition, the proportion of carbon emissions from natural gas is the highest, accounting for 65-73% under environmental optimization and 85-88% under economic optimization. Followed by electricity, with a share of 26-34% and 10-14% under environmental and economic optimization, respectively. Finally, a sensitivity analysis is carried out to analyze the impact of energy carbon emission factors.