Retrospective cohort study. To evaluate the effectiveness of pedicle screw trajectory planning based on artificial intelligence (AI) software in patients with different levels of bone mineral density (BMD). AI-based pedicle screw trajectory planning has potential to improve pullout force (POF) of screws. However, there is currently no literature investigating the efficacy of AI-based pedicle screw trajectory planning in patients with different levels of BMD. The patients were divided into 5 groups (group A-E) according to their BMD. The AI software utilizes lumbar spine CT data to perform screw trajectory planning and simulate AO screw trajectories for bilateral L3-5 vertebral bodies. Both screw trajectories were subdivided into unicortical and bicortical modes. The AI software automatically calculating the POF and pullout risk of every screw trajectory. The POF and risk of screw pullout for AI-planned screw trajectories and AO standard trajectories were compared and analyzed. Forty-three patients were included. For the screw sizes, AI-planned screws were greater in diameter and length than those of AO screws (P<0.05). In groups B-E, the AI unicortical trajectories had a POF of over 200N higher than that of AO unicortical trajectories. POF was higher in all groups for the AI bicortical screw trajectories compared with the AO bicortical screw trajectories (P<0.05). AI unicortical trajectories in groups B-E had a lower risk of screw pullout compared with that of AO unicortical trajectories (P<0.05). AI unicortical screw trajectory planning for lumbar surgery in patients with BMD of 40-120mg/cm3 can significantly improve screw POF and reduce the risk of screw pullout.