In view of problems of large attenuation error and low positioning accuracy of personnel positioning signal in underground long-distance roadway, a weighted centroid localization algorithm based on node cooperation was proposed. Under the ZigBee communication environment, the algorithm selects virtual reference node (unknown node that has been located) at a close distance to cooperate localization with reference node in long-distance roadway, and uses improved small-area triangle weighted centroid localization algorithm to locate the unknown node, uses coordinate correction method to determine position of unknown node. The simulation and experimental results show that the localization of reference nodes and virtual reference nodes can reduce use of long-distance reference nodes, which can solve the problem of large signal attenuation caused by long distance and improve the accuracy and stability of underground personnel positioning. The average positioning error of the algorithm is 1.5 m, which meets requirements of personnel location precision in underground long-distance roadway.