The electrical conductivity (EC) of soil is generally measured after soil extraction, so this method cannot represent the in situ EC of soil (e.g., EC of soils with different moisture contents) and therefore lacks comparability in some cases. Using a resistance measurement apparatus converted from a configuration of soil microbial fuel cell, the in situ soil EC was evaluated according to the Ohmic resistance (Rs) measured using electrochemical impedance spectroscopy. The EC of soils with moisture content from 9.1% to 37.5% was calculated according to Rs. A significant positive correlation (R² = 0.896, p < 0.01) between the soil EC and the moisture content was observed, which demonstrated the feasibility of the approach. This new method can not only represent the actual soil EC, but also does not need any pretreatment. Thus it may be used widely in the measurement of the EC for soils and sediments.