Abstract: We propose a novel Bayesian error correction algorithm based on joint channel and data maximal-likelihood (ML) detection in wireless sensor networks (WSN). The proposed algorithm employs the temporal correlation of the narrowband sensor data in conjunction with the channel state information (CSI) for detection and error correction of the data received over the Rayleigh fading wireless channel. The proposed joint maximum-likelihood (JML) algorithm compares the joint channel and data likelihoods along diﬀerent paths of the data likelihood tree (DLT), which is readily adaptable for eﬃcient practical implementation in WSNs. Further, the JML scheme employs the sphere decoder for computation of the maximally likely sphere sensor data vectors in the WSN and thus has a low computational complexity. Simulation results demonstrate signiﬁcantly reduced sensor error for the proposed WSN sensor correction technique over competing schemes existing in current literature.