To meet the requirements of high dynamic range applications of LiDAR, this paper designs the silicon avalanche photodetector (Si APD) with large linear gain, which can reduce the difficulty of subsequent APD circuits and improve the accuracy of laser ranging. In this paper, a planar n + -p-π-p + avalanche photodetector (APD) is formed by ion implantation and annealing process, based on a silicon intrinsic substrate wafer. And the device structure is optimized to improve the maximum gain value in linear mode. Based on this, a new trench with an ion implantation type guard ring is designed to enhance the linear gain range. The simulation results show that the device operates in the wavelength range of 400~1100 nm and reaches the peak response at 700 nm. The breakdown voltage is 153 V, and the dark current at 90% breakdown voltage is 1.47 nA. The gain range is 2~101 under 32~138 V bias, with a large gain dynamic range and good linearity of gain, which is beneficial for the subsequent amplification circuit. Meanwhile, the calculation shows that the input optical power of APD device corresponding to the optical current compression degree of -1 dB is -16 dBm, which has good linearity in the range of -70~-16 dBm, which is beneficial to improve the overall performance of LIDAR.