Global navigation satellite system (GNSS) spoofing is an emerging threat to GNSS security while GNSS plays an important role in military and civilian fields. Recently, taking into account IMU’s characteristics of no external dependence, as well as the low cost and high precision of cameras, graph optimization-based SLAM (Simultaneous Localization and Mapping) system that is coupled with GNSS measurements has been developed to achieve a more stable positioning performance. However, few existing GNSS spoofing detection methods can be directly adapted to this kind of system. According to our analysis, the residuals in graph optimization can reflect the consistency of different sensor measurements. We proposed a detector exploiting the pseudorange residuals in the graph optimization. After the initialization of coordinates, the proposed method can generate the detector based on raw GNSS/IMU/camera measurements. Experimental results in different GNSS spoofing scenarios have verified the detection performance of our method.