In this paper, an algorithm for estimation and compensation of second-order nonlinearity in wireless sensor setwork (WSN) in distributed estimation framework is proposed. First, the effect of second-order nonlinearity on the performance of Diffusion Least Mean Square (DLMS) algorithm is investigated and an upper bound for $l^2$-norm of the error due to nonlinearity is derived mathematically. Second, mean convergence analysis of the DLMS algorithm in presence of second-order nonlinearity is derived. Third, a distributed algorithm is suggested which consists of extra nonlinearity estimation and compensation units. Moreover, considering the second-order nonlinearity, the Cramer-Rao bound (CRB) for estimating both the unknown vector and nonlinearity coefficient vector is calculated, in which the Fisher information matrix is obtained in a closed-form formula. Simulation results demonstrate the effectiveness of the proposed algorithm in improving the performance of distributed estimation in the presence of nonlinear sensors in a WSN.