Swirling airflow plays a key role in textile production processes. The structure and properties of a textile processed by utilizing swirling airflow depend to a large extent on the dynamics of the fibers in the flow. This work presents a numerical investigation of the dynamics of a flexible fiber in the tangentially injected swirling airflow in a nozzle containing cylindrical and divergent conical sections, which is frequently encountered during textile production. Simulation of the three-dimensional, transient, compressible and turbulent swirling airflow field in the nozzle is first conducted. A model for the particle-level simulation of a flexible fiber in a wall-bounded flow is consequently adopted for studying the fiber motion in the nozzle. This model assumes the fiber to be composed of several massless elastic rods connected by rigid ball–socket joints where various forces and torques are exerted. The stretching, bending and twisting deformations of the fiber as well as the fiber–wall collision can all be modeled. The motional characteristics of the flexible fiber can be obtained by solving the translational and rotational equations for all the ball–socket joints in the fiber model. Based on the model, the effects of two process and nozzle geometric parameters – the nozzle pressure and radial position of the injectors – on the fiber motion are studied. The results show that the model and methods presented in this work can provide effective and useful insights into the dynamics of flexible fiber in the swirling airflow field inside complex-structured nozzles employed in the textile production processes.