Based on NaSch model, energy consumption in the mixed traffic flow was investigated. The formula of energy consumption was presented. There are three factors of mixed traffic flow to be studied, which are the maximum velocity, length of vehicle, and the ratio of the mixed traffic flow (Cn), respectively. Simulation and analysis indicated that the energy consumption of the mixed traffic flow consisting of vehicles of the same length but different maximum velocity is associated with the lowest maximum velocity and its ratio. The slower the maximum velocity and its fraction, the more energy consumed. Moreover, for the mixed traffic flow consisting of vehicles with the same maximum velocity bot different length, the energy consumption is related to the ratio Cn of mixed vehicles. Longer vehicles lead to more energy consumption. For the mixed traffic flow involing vehicles of different maximum velocity and lengths, its energy consumption is determined by the ratio Cn of the mixed vehicles and delay probability p, the more the short and fast vehicles(Cn→0), the less energy consumed, and vice versa.