This study, utilizing comprehensive railway project A as a case study, offers a multifaceted analysis of construction work volume, machinery energy consumption, and carbon emissions. We employ a ''top-down'' approach, taking into account construction scenarios and types of energy consumption, to establish a framework for a railway construction machinery energy consumption model. Following the computation of diesel carbon emission factors appropriate for construction requirements, we put forth a swift computation algorithm for provincial grid carbon emission. The algorithm undergoes precision verification and application, reducing the calculation complexity and cost of existing carbon emission models by approximately tenfold. This model is pilot-tested at construction section A, generating the corresponding energy consumption and carbon emission model. Results denote that, from a construction scenario perspective, tunnel construction's energy consumption and carbon emissions account for roughly 80%, thus taking a leading stance. Regarding energy consumption types, carbon emissions from electricity significantly surpass those from oil. Based on these results, we outline specific characteristics of railway construction and propose key strategies to achieve energy saving and emission reduction. These include enhancing the operational efficiency of electrical equipment in tunnel construction, diminishing the use of diesel equipment, and adopting energy-saving, intelligent, and new energy equipment. The findings of this study substantially aid the rapid calculation of energy consumption and carbon emissions in railway construction, offering new parameters, algorithms, perspectives, and proposals that serve scientific research in related domains.