Motor vehicles emit a large amount of air pollutants. NOx and particulate matter (PM) account for 53.2% and 74.7%, respectively, of vehicle emissions in China. Using the technical guidelines for compiling road vehicle emission inventories, the emission factors based on the onboard diagnostics (OBD) system of heavy-duty diesel vehicles are obtained. The trajectory of heavy-duty diesel vehicles is corrected using big data interpolation, and the correction coefficients for different vehicle speeds are fitted to calculate the corresponding correction factors. Simultaneously, the Weather Research and Forecasting model is used for the meteorological correction of emissions, a heavy-duty diesel vehicle emission inventory under the community multiscale air quality model is established, and the distribution characteristics of pollution emissions from heavy-duty diesel vehicles in Chengdu are analyzed at the time and space levels. Overall, the pollutant gasses emitted by heavy-duty diesel vehicles in Chengdu are largely concentrated at the city center. In 2023, the total annual emissions of the pollutants NOx, CO, fine PM, and volatile organic compounds from heavy-duty diesel vehicles in Chengdu were 10,590.60, 28,852.90, 686.18, and 657.60 tons, respectively. NOx and CO have the highest proportions among the major pollutants, accounting for 70.7% and 26%, respectively.