The invention provides a trajectory constraint method based on ultra-wideband real-time positioning. The method comprises the following steps: 1, sampling a road straight line or curve; 2, performingcurve segmentation and point taking; 3, performing regional partitioning; 4, creating a buffer area according to the road intersection points; 5, resolving related information such as positioning point coordinates by an ultra-wideband resolving module; 6, preprocessing the positioning coordinates; 7, selecting M areas closest to the positioning coordinates; 8, taking a point, closest to the positioning coordinate, on the road; 9, generating a new positioning point according to a buffer strategy; 10, performing Kalman filtering processing on the new positioning point so as to output the position. According to the method, the positioning points are effectively restrained, the smoothness of the track is improved, abnormal data processing is added, especially special processing is carried outon the road intersection points, misjudgment of the positioning point roads is effectively reduced, and the track pulling phenomenon is greatly reduced.