The invention relates to the technical field of indoor positioning, in particular to a high-precision indoor three-dimensional positioning method based on UWB (ultra-wideband), optical flow and inertial navigation. The method comprises the steps of performing error compensation on an accelerometer and a gyroscope to complete initial alignment; entering a navigation stage, performing navigation calculation on parameters measured by the accelerometer and the gyroscope in real time to obtain real-time speed, position and attitude information of a carrier, and constructing a measurement matrix with ultra-wideband UWB positioning information and speed information of an optical flow sensor; constructing a state equation of indoor three-dimensional positioning of the carrier, and solving the state equation according to a Kalman filtering algorithm and measurement matrixes at different moments to obtain estimated values of the state matrixes at different moments, wherein the estimated values are indoor three-dimensional positioning information of the carrier. Through the method disclosed by the invention, full-autonomous indoor navigation can be realized, the required base stations can begreatly reduced in comparison with the indoor positioning of Bluetooth beacons, and the base arrangement can be greatly reduced in comparison with pure UWB indoor positioning, and the positioning is more continuous.