Located in the northern end of the Manila Trench, the deformation front (DF) off southwestern Taiwan is considered as a potential area for generating hazardous earthquakes and tsunamis. However, this area has been relatively seismically quiet, and the seismogenic structure has been unclear, particularly in the middle-to-lower crust. On February 10, 2017, an Mw5.3 earthquake occurred in the near-shore area of Tainan in SW Taiwan, which provides us with a good opportunity to study the seismogenic structure of this area. Five ocean bottom seismometers (OBSs) were deployed to cover the mainshock source area from February 13 to March 1, 2017, to record the aftershock data. All the OBSs were successfully recovered and, the P- and S-wave arrival were manually identified. In collaboration with arrival times from the Central Weather Bureau of Taiwan, we simultaneously determined the 1-D optimal Vp and Vs velocity models and hypocenter locations. The inversion results show that the upper crust (<15 km) has a relatively low velocity, and most events are confined between 10 and 15 km depth. The relocated epicenters were all in areas with positive gravity anomalies, and most of them formed a NE-SW striking seismogenic structure that was approximately parallel to the surface trace of the DF and did not link to any known active faults in SW Taiwan. The hypocenters illustrate a conjugate fault system comprising of a SW-dipping NE-SW striking fault and an SE-dipping NW-SE striking fault. Based on focal mechanisms and aftershock distribution, we demonstrate that the 2017 Tainan near-shore earthquake may result from the reactivation of pre-existing faults, and the driving force comes from the bending stresses of the subducting Eurasia Plate at the Manila Trench. Given the active subduction processes offshore of Taiwan, such slab-flexural-related earthquakes must be considered in seismic and tsunami hazard assessments.