The navigation and localization of autonomous underwater vehicles (AUVs) in seawater are of the utmost importance for scientific research, petroleum engineering, search and rescue, and military missions concerning the special environment of seawater. However, there is still no general method for AUVs navigation and localization, especially in the featureless seabed. The reported approaches to solving AUVs navigation and localization problems employ an expensive inertial navigation system (INS), with cumulative errors and dead reckoning, and a high-cost long baseline (LBL) in a featureless subsea. In this study, a simultaneous localization and mapping (AMB-SLAM) online algorithm, based on acoustic and magnetic beacons, was proposed. The AMB-SLAM online algorithm is based on multiple randomly distributed beacons of low-frequency magnetic fields and a single fixed acoustic beacon for location and mapping. The experimental results show that the performance of the AMB-SLAM online algorithm has a high robustness. The proposed approach (the AMB-SLAM online algorithm) provides a low-complexity, low-cost, and high-precision online solution to the AUVs navigation and localization problem in featureless seawater environments. The AMB-SLAM online solution could enable AUVs to autonomously explore or autonomously intervene in featureless seawater environments, which would enable AUVs to accomplish fully autonomous survey missions.