In order to solve the optimization problem of carbon nanotube (CNT) yarn sensor network embedded in three-dimensional (3D) braided composite materials and realize the structural health monitoring of internal damage of aerospace parts, the multi-objective optimization of the number and location of sensors was studied using non-dominated neighborhood immune algorithm (NNIA). Through the research of 3D six-direction braiding process, stress sensitivity of single CNT yarn sensor, and damage location of 3D braided composites, the number, position, and coverage constraint functions based on NNIA algorithm are constructed. In addition, the number and position of three-dimensional braided composite embedded CNT yarn sensors with different sizes are solved. Through the stress experiment and data analysis of damaged parts, it is proved that the optimized configuration result of CNT yarn sensor obtained by NNIA algorithm is suitable for the damage monitoring of 3D braided composites. The damage location error is less than 1 mm. This study lays a foundation for the establishment of damage source localization model of 3D braided composites.