There are many reasons to consider when your leg hurts when you walk, and they are divided into two major problems: joint and spine. If it is a joint problem, you need to rule out osteoarthritis of the knee, meniscal damage, ligament damage in the past of the knee, etc. If the pain is in the ankle, you need to rule out osteoarthritis of the ankle, ankle impingement, and ankle free bodies. In the case of hip pain, early femoral head necrosis, hip impingement, hip synovitis, hip osteoarthritis, etc. should be ruled out. If it is a spinal problem, you need to exclude lumbar spinal stenosis, lumbar disc herniation, ligamentum flavum hypertrophy, and lumbar spondylolisthesis, all of which can lead to spinal stenosis, resulting in dural sac ischemia and causing soreness and pain in the lower extremities. In addition, problems in the foot and ankle can also cause pain when the leg walks, such as flatfoot syndrome, plantar fasciitis, Achilles tendonitis and so on. Therefore, if your leg hurts when you walk, it should be analyzed according to the specific situation, and if necessary, you should visit a specialist hospital.