The Chi-Chi earthquake in Taiwan (ML = 7.3) occurred on 21 September, 1999 and caused widespread damage over a large area in central Taiwan. A distinct rupture appeared along the Chelungpu fault, which marks the transition form a sedimentary basin to the thrust terrain of the Western foothills. In order to investigate the sub-surface geometry of the Chelungpu fault and the structural features that may have influenced the distribution of Chi-Chi aftershocks, a three-dimensional P-wave velocity model has been developed. The velocity model was determined by simultaneously inverting 41,347 P-wave arrival times from 2,582 pre-mainshock "background" earthquakes. The most striking feature imaged by the velocity model is the high velocity wedge extending from surface to about a 15 km depth beneath the Western foothills. The Chi-Chi mainshock just occurred in the transition area from the high velocity wedge to a basin-type low velocity material where the sub-surface geometry of the Chelungpu fault is proposed. The model also images an elongated high velocity volume at midcrustal depths beneath the eastern flank of the Central Range. West of the Chelungpu fault, another high velocity volume is found at the similar depths which could be associated with the Peikang basement high. Within these two high velocity volumes, the Western foothills and the Central Range exhibit relatively low velocity in the middle-crust. A possible explanation for the nucleation of the Chi-Chi earthquake, the thrust faulting and deformation in central Taiwan is attributed to the interactions between the three high-low-high velocity volumes in response to regional compression.