A collision-free path planning method is proposed based on learning from demonstration (LfD) to address the challenges of cumbersome manual teaching operations caused by complex action of yarn storage, variable mechanism positions, and limited workspace in preform weaving. First, by utilizing extreme learning machines (ELM) to autonomously learn the teaching data of yarn storage, the mapping relationship between the starting and ending points and the teaching path points is constructed to obtain the imitation path with similar storage actions under the starting and ending points of the new task. Second, an improved rapidly expanding random trees (IRRT) method with adaptive direction and step size is proposed to expand path points with high quality. Finally, taking the spatical guidance point of imitation path as the target direction of IRRT, the expansion direction is biased toward the imitation path to obtain a collision-free path that meets the action yarn storage. The results of different yarn storage examples show that the ELM-IRRT method can plan the yarn storage path within 2s–5s when the position of the mechanism changes in narrow spaces, avoiding tedious manual operations that program the robot movements, which is feasible and effective.