In scenarios with insufficient structural features, LiDAR-based SLAM may suffer from degeneracy, resulting in impaired robot localization and mapping and potentially leading to subsequent deviant navigation tasks. Therefore, it is crucial to develop advanced algorithms and techniques to mitigate the degeneracy issue and ensure the robustness and accuracy of LiDAR-based SLAM. This paper presents a LiDAR–inertial simultaneous localization and mapping (SLAM) method based on a virtual inertial navigation system (VINS) to address the issue of degeneracy. We classified different gaits and match each gait to its corresponding torso inertial measurement unit (IMU) sensor to construct virtual foot inertial navigation components. By combining an inertial navigation system (INS) with zero-velocity updates (ZUPTs), we formed the VINS to achieve real-time estimation and correction. Finally, the corrected pose estimation was input to the IMU odometry calculation procedure to further refine the localization and mapping results. To evaluate the effectiveness of our proposed VINS method in degenerate environments, we conducted experiments in three typical scenarios. The results demonstrate the high suitability and accuracy of the proposed method in degenerate scenes and show an improvement in the point clouds mapping effect. The algorithm’s versatility is emphasized by its wide applicability on GPU platforms, including quadruped robots and human wearable devices. This broader potential range of applications extends to other related fields such as autonomous driving.