A 4-year-old boy was shot in the lower leg Thursday afternoon at a home on Scott's Ridge Trail in Apex, police said.