Objective Using digital medical software to conduct three-dimensional reconstruction of the lumbar intervertebral foramen and its adjacent nerves, and measure the parameters related to the working channel of the transforaminal endoscope in the three-dimensional model, so as to guide the insertion of the transforaminal endoscope working channel and avoid nerve root injury. Methods The MRI "Dicom" data of the lumbar spine were imported into the medical three dimentional reconstruction software Mimics 17.0 to obtain a three dimentional model of the lumbar spine. And the anatomical parameters related to the working channels of the transforaminal endoscope on both the left and right sides of the three spinal segments (L3—S1) of the patients were measured. The differences between relevant anatomical parameters of different intervertebral spaces on the same side and those of the same intervertebral space on both sides were compared. Results The vertical and horizontal dimensions size of different intervertebral foramina on the same side at the L3—S1 levels showed a gradual decreasing trend, and all the differences were statistically significant (all P<0.05). There was no statistically significant difference in the vertical and horizontal dimensions size of the intervertebral foramina between the two sides of the same spinal segment (P>0.05). There were statistically significant differences in the distances from the nerve roots to the superior articular processes among different segments on the same side at the L3—S1 levels (P<0.05). The distances from the nerve roots to the superior articular processes at the L3—S1 levels showed a gradually increasing trend from top to bottom. There was no statistically significant difference in the distances from the nerve roots to the superior articular processes between the two sides of the same spinal segment (all P>0.05). Conclusion The distances from the L3—S1 nerve roots to the superior articular processes gradually increase from top to bottom. At the level of the inferior endplates of the intervertebral spaces in the L3—L4 and L4—L5 segments, the distances from the nerve roots to the superior articular processes are smaller than the diameter of the working cannula (7.5 mm). Therefore, it is necessary to grind away part of the superior articular processes to safely insert the working cannula of the transforaminal endoscope; otherwise, it may lead to nerve root injury.