Building energy simulation is playing an increasingly important role in building energy codes. This paper investigates the important underlying issues affecting the use of building energy simulation for enhancing building energy codes. The background and development of building energy codes is described. The rationale and important issues of performance- based building energy codes are explained. The practical building design and essential simulation skills are presented. Finally, the key factors affecting the effectiveness and validity of the simulation approach are discussed.