Simultaneous localization and mapping (SLAM) is a typical computing-intensive task. Based on its own computing power, a mobile robot has difficult meeting the real-time performance and accuracy requirements for the SLAM process at the same time. Benefiting from the rapid growth of the network data transmission rate, cloud computing technology begins to be applied in the robotics. There is the reliability problem caused by solely relying on cloud computing. To compensate for the insufficient airborne capacity, ensure the real-time performance and reliability, and improve the accuracy, a SLAM algorithm based on edge-cloud collaborative computing is proposed. The edge estimates the mobile robot pose and the local map using a square root unscented Kalman filter (SR-UKF). The cloud estimates the mobile robot pose and the global map using a distributed square root unscented particle filter (DSR-UPF). By using sufficient particles in the cloud, DSR-UPF can improve the SLAM accuracy. The cloud returns the particle with the largest posteriori probability to the edge, and the edge performs edge-cloud data fusion based on probability. Both the simulation and the experimental results show that the proposed algorithm can improve the estimation accuracy and reduce the execution time at the same time. By transferring the heavy computation from robots to the cloud, it can enhance the environmental adaptability of mobile robots.