This study presents energy and exergy analyses of aquifer thermal energy storage (ATES) integrated with a building heating and cooling system. In this regard, a typical bidirectional ATES integrated with a heat pump (HP) is considered in the provision of required heating and cooling demands. The different ATES components and the operating principle are described. Furthermore, energy and exergy models are formulated for three subprocesses: charging, storing, and discharging, to track changes in energy and exergy quantities with discharging time. The energetic and exergetic efficiencies are then evaluated for both operating cases. The limitation of the use of energy efficiency for ATES performance assessment is elaborated. In contrast, the importance of exergy analysis as a practical and temperature sensitive tool is considered as a quantitative and a qualitative measure of the ATES performance. Additionally, a comparison between energetic and exergetic efficiencies is presented where energy efficiency involves some ambiguities, especially when energy recovered from ATES is at a low temperature rather than at an ambient temperature.