To solve the problem of pseudorandom (PN) codes estimation for direct sequence spread spectrum (DSSS) signals over multipath channels in non-cooperative communication, based on analyzing the second-order statistics of the signals, a method for joint blind estimation of PN codes and channels with maximum likelihood (ML) is proposed. First, we establish a ML mathematical model of PN codes and multipath channels. Then, we iteratively transform the mathematical model and use the iterative least square projection (ILSP) algorithm to estimate the PN code and channel. Furthermore, to reduce the complexity of the algorithm and avoid the matrix inversion, we present an adaptive rule of our algorithm. Finally, to avoid the decrease of PN code estimation accuracy caused by the channel estimation error, especially under low signal-to-noise ratio, an improved algorithm based on the iterative total least squares projection (ITLSP) is presented. The proposed methods are applicable to all types of PN codes and the simulation results are presented to demonstrate the effectiveness of the algorithms. © 2021, Chinese Institute of Electronics. All right reserved.