For positioning tasks of mobile robots in indoor environments, the emerging positioning technique based on visual inertial odometry (VIO) is heavily influenced by light and suffers from cumulative errors, which cannot meet the requirements of long-term navigation and positioning. In contrast, positioning techniques that rely on indoor signal sources such as 5G and geomagnetism can provide drift-free global positioning results, but their overall positioning accuracy is low. In order to obtain higher precision and more reliable positioning, this paper proposes a fused 5G/geomagnetism/VIO indoor localization method. Firstly, the error back propagation neural network (BPNN) model is used to fuse 5G and geomagnetic signals to obtain more reliable global positioning results; secondly, the conversion relationship from VIO local positioning results to the global coordinate system is established through the least squares principle; and finally, a fused 5G/geomagnetism/VIO localization system based on the error state extended Kalman filter (ES-EKF) is constructed. The experimental results show that the 5G/geomagnetism fusion localization method overcomes the problem of low accuracy of single sensor localization and can provide more accurate global localization results. Additionally, after fusing the local and global positioning results, the average positioning error of the mobile robot in the two scenarios is 0.61 m and 0.72 m. Compared with the VINS-mono algorithm, our approach improves the average positioning accuracy in indoor environments by 69.0% and 67.2%, respectively.