This paper introduces a theoretical model for forecasting fiber orientation in 3D-printed ultra-high-performance concrete (3DP-UHPC). Initially, the dynamic evolution process of fiber alignment in 3DP-UHPC was characterized using X-ray computed tomography (X-CT) and image analysis. The results indicated that fiber alignment during extrusion process was primarily constrained by the rigid boundary of nozzle. Leveraging stereology theory, the regularity of fiber alignment affected by boundary effects was elucidated. Following layer deposition, the flattening effect resulting from the nozzle's extrusion force and gravity of upper layers influenced fiber alignment along printing direction. To quantify this impact, a flattening correction coefficient was introduced to modify fiber orientation coefficient in an ideal state. Finally, considering the overlapping effect of boundary and flattening on fiber orientation in 3DP-UHPC, a theoretical model was developed to predict fiber orientation. The model demonstrated robust adaptability, providing valuable insights into the design of 3DP-UHPC with improved fiber reinforcement efficiency.