A three-dimensional Computational Fluid Dynamics (CFD) simulation for the beta-type Stirling engine is performed. Firstly, a thorough characterization of the thermal and fluid flow fields during the cycle is presented. Secondly, a comprehensive energy analysis for the engine is conducted to accurately identify the sources and magnitudes of thermodynamic losses. Computational results show a close agreement with the experimental results with an accuracy of about 96%. Within the compression and expansion spaces, the dominant heat transfer rates occur during the expansion strokes due to the significant impinging effect of the tumble vortices generated from the flow jetting. Furthermore, the jetting and ejecting processes into the regenerator is characterized by a significant temperature gradient and a large matrix temperature oscillation. The pressure difference between the expansion and compression spaces is the main driver for the flow leakage through the appendix gap. From the energy analysis, the regenerator thermal loss and the pumping power represent the largest part of the Stirling engine losses by about 9.2% and 7.5%, respectively.