In the former Soviet Union, electric traction eventually became somewhat more energy-efficient than diesel. Partly due to inefficient generation of electricity in the USSR (only 20.8% thermal efficiency in 1950 vs. 36.2% in 1975), in 1950 diesel traction was about twice as energy efficient as electric traction (in terms of net tonne-km of freight per kg of fuel). But as efficiency of electricity generation (and thus of electric traction) improved, by about 1965 electric railways became more efficient than diesel. After the mid 1970s electrics used about 25% less fuel per ton-km. However diesels were mainly used on single track lines with a fair amount of traffic  so that the lower fuel consumption of electrics may be in part due to better operating conditions on electrified lines (such as double tracking) rather than inherent energy efficiency. Nevertheless, the cost of diesel fuel was about 1.5 times more (per unit of heat energy content) than that of the fuel used in electric power plants (that generated electricity), thus making electric railways even more energy-cost effective.
What could be a factor of lower energy consumption for electric trains?
better operating conditions on electrified lines