In this paper, we adopt the methods of Euler deconvolution, source parameter imaging (SPI), source edge detection (SED), inversion of the Moho interface, and three-dimensional (3-D) visualization of the crust for the inversion of the Bouguer gravity anomaly of the Longmen Shan and adjacent regions, analyse the 3-D structure, deep structure, and deformation characteristics of the crust, and investigate the cause of the deep seismogenic environment and the Wenchuan earthquake. The research indicates that the Longmen Shan fault zone is characterized by a NE-trending large gravity gradient zone with a gradient value that exceeds 3.7 mGal/km. The Euler diagram reveals that there is a low-density anomaly body in the lower crust of the Longmen Shan fault zone that is a NE-trending narrow strip approximately 100 km long, 65 km wide and 35–50 km deep. The Songpan-Garze block on the northwest side does not have the material source and pathway of the lower crustal flow in the Euler diagram. Therefore, the low-density anomaly body is related to the upwelling of the mantle heat flow below it. In comparison with the Songpan-Garze and Chuan-Dian blocks, the strength of the field source of the Sichuan Basin is high (−175 to −96 mGal), indicating that the average density of the crust is high, and the depth of the field source is stable at 15–25 km. The SED map reveals that there has been counter-clockwise rotation of the Sichuan Basin since the Cenozoic. The SPI shows that the Longmen Shan fault zone is narrowly located in the beaded linear “shallow source anomaly” belt and that its two sides are stable areas of deep source anomalies, indicating characteristics of crustal hardness on both sides, so that it is prone to accumulate stress and strain. The Moho depth across the Longmen Shan descends from 41.8 km in the east to 61.6 km in the west. The complex intersection of high-density and low-density anomaly bodies appears in the deep part of the Longmen Shan tectonic belt, and the crustal structure is fragmented. Moreover, there is a strong abrupt change in the Moho topography, and therefore, this region has a deep environment for the genesis of strong earthquakes. The dextral strike-slip movement of the Longmen Shan fault zone is caused by the movement of the Songpan-Garze block and the counter-clockwise rotation of the Sichuan Basin; therefore, the counter-clockwise rotation of the Sichuan Basin is one of the important dynamic backgrounds for the 2008 Wenchuan earthquake.