SESRI 300 MeV synchrotron in Harbin Institute of Technology is now under construction and the whole equipment has been installed and tested. Before commissioning beam, the beam transport through the injection line is simulated by using a full-scall model through the Tracewin code. The field distribution of RFQ cavity is calculated with CST, and the results are substituted into the Tracewin code to generate the accurate results. The envelop mode and multi-particles mode are used in the beam simulation with two typical beams (H<inline-formula><tex-math id="Z-20220529151953">\begin{document}${}_2^+ $\end{document}</tex-math><alternatives><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="11-20212112_Z-20220529151953.jpg"/><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="11-20212112_Z-20220529151953.png"/></alternatives></inline-formula> and <sup>209</sup>Bi<sup>32+</sup>, the lightest beam and the heaviest beam). Both beams are accelerated from 4 keV/u to 2 MeV/u by an RFQ cavity and two IH-DTL cavities. Then the H<inline-formula><tex-math id="Z-20220529152018">\begin{document}${}_2^+ $\end{document}</tex-math><alternatives><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="11-20212112_Z-20220529152018.jpg"/><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="11-20212112_Z-20220529152018.png"/></alternatives></inline-formula> beam is stripped into a proton beam by a carbon foil and accelerated to 5.6 MeV with the third IH-DTL cavity. Simulation results show that the strength of the magnetic field and the acceleration field are proportional to the mass charge ratio. The beam transmission efficiency and the injection line reception are inversely proportional to the beam transverse emittance. The <sup>209</sup>Bi<sup>32+</sup> beam transmission efficiency and beam reception (momentum spread less than ±0.2%) are 72.16% and 46.72% with transverse emittance <i>ε</i> = 0.12π mm·mrad (ECR source output) and <i>ε</i> = 0.4π mm·mrad (RFQ output). H<inline-formula><tex-math id="Z-20220529152204">\begin{document}${}_2^+ $\end{document}</tex-math><alternatives><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="11-20212112_Z-20220529152204.jpg"/><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="11-20212112_Z-20220529152204.png"/></alternatives></inline-formula> beam transmission ratio and beam reception are 24.19% and 17.89% with <i>ε</i> = 0.2π mm·mrad (ECR source output) and <i>ε</i> = 0.5π mm·mrad (RFQ output). In order to obtain high transmission efficiency and beam reception, the transverse emittance should be limited to 0.1π mm·mrad after the RFQ. With this limitation, the <sup>209</sup>Bi<sup>32+</sup> beam transmission efficiency and the reception are increased to 96.68% and 92.63%, respectively, and the H<inline-formula><tex-math id="Z-20220529152129">\begin{document}${}_2^+ $\end{document}</tex-math><alternatives><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="11-20212112_Z-20220529152129.jpg"/><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="11-20212112_Z-20220529152129.png"/></alternatives></inline-formula> beam transmission efficiency and the rception rise to 74.40% and 68.18%, respectively. If two additional quadrupole magnets are added, the H<inline-formula><tex-math id="Z-20220529152030">\begin{document}${}_2^+ $\end{document}</tex-math><alternatives><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="11-20212112_Z-20220529152030.jpg"/><graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="11-20212112_Z-20220529152030.png"/></alternatives></inline-formula> beam transmission efficiency and beam reception can be increased to 90.73% and 83.61%, respectively, which will fulfill the requirement for long-time operation. The phase space change process shows that loss of <sup>209</sup>Bi<sup>32+</sup> beam is caused mainly by longitudinal defocusing (energy spread and phase width spread), the loss of proton beam is caused both by the longitudinal defocusing and by the transverse defocusing (beam envelop spreading), that is why two additional focusing magnets should be added in proton beam acceleration. Results also show that by using field distribution calculation in the simulation process the greater influence of the cavity design details can be confirmed such as beam off-axis caused by dipole field in the IH-DTL cavity and beam loss caused by unperfect field in the RFQ. Tracking with field distribution is shown to be a useful method to link the cavity design process, beam line design process, and beam commission process.