To realize the intelligent optimization for the tree structures supporting freeform surface roof or bearing uneven load, a new shape optimization method based on the back-propagation (BP) neural network is proposed. This method enables the intelligent positioning of hierarchical nodes through a recursive approach from top-down, with the aim of satisfying the zero bending moment and structural stability. Using three-dimensional tree structures as an example, this study provides a detailed description of the implementation method and steps of intelligent shape optimization, along with a comparative analysis with the reverse-hang recursive approach. Results indicate that the proposed approach effectively addresses the challenge of locating load-bearing centers in tree structures with uneven loads or freeform surface roofs. It not only demonstrates universality for tree structures under complex engineering conditions, but also enhances efficiency and intelligence in the structure optimization design.