Together with one of its variants, the recently proposed phase-merging enhanced harmonic generation (PEHG) free-electron laser (FEL) is systematically studied in this paper. Different from a standard high-gain harmonic generation scheme, a transverse gradient undulator is employed to introduce a phase-merging effect into the transversely dispersed electron beam in PEHG. The analytical theory of the phase-merging effect and the physical mechanism behind the phenomenon are presented. Using a representative set of beam parameters, intensive start-to-end simulations for soft x-ray FEL generation are given to illustrate the performance of PEHG. Moreover, some practical issues that may affect the performance of PEHG are also discussed.