It depends. Electric motors also have losses in their controllers, which removes another 5% or 10%. If you want mechanical power output and have 1kg of pre-charged batteries and 1kg of liquid fuel, the efficiency of electric motors might close the density gap. Lets assume 95% efficient controller+motor (slightly optimistic) and 30% efficient ICE (somewhat pessimistic).
1kg * 14 MJ/kg * 95% = 13 MJ mechanical
1kg * 47 MJ/kg * 30% = 14 MJ mechanical
It comes out pretty close!
If you want mechanical power and also heat (for keeping people, animals, or equipment warm, decreasing the viscosity of fluids, etc), ICE is definitely the way to go.
-- edit --
/u/ash points out Tesla's energy density is is 0.576 MJ/kg
1kg * 0.58 MJ/kg * 95% = 0.55 MJ mechanical
...not even slightly close.