It has been observed that there are sustained electrical potential difference and current between a tree trunk and its surrounding soil, which have bright application prospects for powering wireless sensor networks in forests. But the mechanism of the bioelectricity has remained controversial. In order to provide more comprehensive data for further researches and to analyze the relationship between the bioelectricity in tree trunks and their surrounding environmental parameters, an experiment has been made. The output power of selected trees, xylem pH, as well as the environmental parameters such as air temperature, air relative humidity, soil temperature, soil moisture and soil pH were measured. Results supported the hypothesis that bioelectricity in xylem has a significant relativity with soil pH. Moreover, it was found that air relative humidity, soil temperature and material of electrode affected the bioelectricity in the xylem. DOI: http://dx.doi.org/10.11591/telkomnika.v11i8.3148