Seismicity and distribution of earthquakes can provide active fault structural information on the crust at a regional scale. The morphology of faults can be derived from the epicentral distribution of micro-earthquakes. In this study, we combined both the relocated earthquake catalogue and related preliminary geophysical information for 3D modeling of the crust in the Xichang area, Sichuan province, China. The fault morphology and deep crustal structure were automatically extracted by the machine learning approach, such as the supervised classification and cluster analysis methods. This new 3D crustal model includes the seismic velocity distribution, fault planes in 3D and 3D seismicity. There are many earthquake clusters located in the folded basement and low-velocity zone. Our model revealed the topological relation between the folded basement and faults. Our work show the crustal model derived is supported by the earthquake clusters which in turn controls the morphological characteristics of the crystalline basement in this area. Our use of machine learning techniques can not only be used to predict the refined fault geometry, but also to combine the seismic velocity structure with the known geological information. This 3D crustal model can also be used for geodynamic analysis and simulation of strong motionseismic waves.