We investigate the topological phase transition of the square-hexagon lattice driven by the next-nearest-neighbor (NNN) hopping. By means of the Fukui-Hatsugai method, the topological invariantZ2can be determined. The phase diagrams in the (t1,t2) plane for different filling fractions are displayed, together with the size of the bulk band gap. We find the competition betweent1andt2can drive the system into topological nontrivial phase, withZ2= 1. Interestingly, for 2/5 and 3/5 filling fractions, topological nontrivial phase can be easily realized when the NNN hoppings are turned on. Besides, the phase diagrams in the plane oft2andλso2(t1andλso1) are also investigated. By numerically diagonalizing the Hamiltonian, the bulk band structures are calculated. And the topological trivial and nontrivial phase are also distinguished in terms of helical edge state. In experiments, these topological phase transitions may be realized by shaking optical lattice.