The EMD SD40 was introduced in January 1966 as part of a sweeping revision of Electro-Motive Division's locomotive catalog. That year, EMD replaced its earlier lineup with an entirely new generation of models all powered by the newly developed 645 series diesel engine. The SD40 emerged alongside the SD38, the SDP40, and the higher-horsepower SD45, with all four six-axle models sharing a high degree of component commonality, including frame architecture, cab design, trucks, traction motors, and air brake systems. This standardization simplified maintenance for railroads operating mixed fleets and helped cement EMD's dominant position in the North American locomotive market during the late 1960s.
Over the course of its production run, which concluded in August 1972, EMD and its Canadian affiliate General Motors Diesel built a total of 1,268 SD40 units. The majority, approximately 856 locomotives, were delivered to American railroads, while roughly 330 went to Canadian operators and 72 were sold to Mexican railways. Smaller export orders included six units for the Guinea-Boke mining project in West Africa and four broad-gauge examples delivered to Brazil. Domestic production took place at EMD's McCook, Illinois facility, while Canadian orders were fulfilled at the GMD plant in London, Ontario. A specialized variant known as the SD40A, comprising 18 units built for the Illinois Central Railroad, used the longer frame of the SDP45 to accommodate a larger fuel tank.
The SD40 proved to be a durable and well-regarded design, and many units remained in active service long after production ended. In 1972, EMD introduced the SD40-2, an improved derivative featuring updated Dash 2 modular electronics, which effectively superseded the original model on the new locomotive market. Even so, significant numbers of SD40s were subsequently rebuilt and upgraded by various railroads and independent shops, sometimes emerging as SD40-3 variants equipped with microprocessors for improved traction and fuel management. The Southern Pacific rebuilt its fleet of SD40s between 1980 and 1981 as SD40Rs, and Morrison Knudsen produced SD40M-2 rebuilds for both the Southern Pacific and Canadian Pacific using donor locomotives that included SD45s alongside original SD40s.
The SD40 rides on a C-C wheel arrangement, meaning it uses two three-axle powered trucks, giving it six driven axles in total. Its prime mover is the EMD 645E3, a turbocharged 16-cylinder version of the 645 engine family, producing 3,000 horsepower and driving the locomotive through a direct current electrical transmission system. The 645 series represented a significant engineering advancement over the earlier 567 engine family, featuring larger cylinder displacement and improved thermal efficiency. By positioning the SD40 between the 2,000 horsepower SD38, which used a naturally aspirated 16-cylinder 645, and the 3,600 horsepower SD45, which employed a turbocharged 20-cylinder variant, EMD offered railroads a rational progression of power outputs within a unified mechanical platform.
The shared componentry across the 1966 model generation meant that railroads could reduce their spare parts inventories and cross-train mechanical staff more efficiently. The SD40's balance of power output, adhesion, and mechanical reliability made it particularly attractive for heavy freight service, and the C-C truck configuration distributed tractive effort across six axles, improving performance on grades and in adverse weather conditions. The development history of the model stretches back to at least mid-1964, when EMD constructed an early test locomotive, later numbered as Illinois Central 6071, on an SD35 frame to evaluate the 645 engine and related systems ahead of the full production launch.