ZigBee is a popular wireless communication protocol developed for low-cost, short-range networking such as wireless sensor network (WSN) consisting of a large number of sensor nodes. Since the connectivity is limited on each node, some nodes might become isolated from the network, especially during the stage of ZigBee commissioning. The performance of the existing node connection schemes for WSN is significantly influenced by noise or operational condition of the environment. In this paper a machine learning-based scheme for effective node connection of ZigBee-based WSN is proposed. It employs back propagation neural network (BPNN) to accurately estimate the received signal strength indicator (RSSI) samples used for the selection of the nearest node for connection, while the particle swarm optimisation (PSO) algorithm is employed to properly initialise the BPNN. Computer simulation reveals that the proposed scheme consistently allows higher accuracy of node selection than the existing RSSI-based schemes in varying operational conditions, even with a small number of RSSI samples. It also requires smaller processing time.