The largehead hairtail (Trichiurus japonicus) is the most productive fish caught in China. In order to understand the seasonal distribution of T. japonicus in the East China Sea and the central and southern parts of the Yellow Sea, three species distribution models were used in this study, namely the random-forest model, K-nearest-neighbor algorithm, and gradient-ascending decision-tree model, based on the data of trawling surveys in the East China Sea and central and southern parts of the Yellow Sea from 2008 to 2009. Combined with a variance inflation factor and cross-check, a distribution model of T. japonicus was screened and constructed to analyze the influence of environmental factors on the distribution of T. japonicus in the East China Sea and central and southern parts of the Yellow Sea. The results showed that the random-forest model had the advantages of fitting effect and prediction ability among the three models. The analysis of this model showed that the water depth, bottom water temperature, and surface salinity had a great influence on the habitat distribution of T. japonicus. The relative resources of T. japonicus increased with the increase of bottom water temperature, reached the maximum at 23.8 °C, and first increased and then decreased with the increase of water depth and surface salinity, reaching the maximum when water depth is 72 m and surface salinity is 31.2%. This study also used the random-forest model to predict the spatial distribution of T. japonicus in the central and southern waters of the East China Sea and south-central Yellow Sea from 2008 to 2009, and the results showed that the predicted results were close to the actual situation. The research results can provide a reference for the exploitation and protection of T. japonicus resources in the East China Sea and the south-central Yellow Sea.