More than 36 people were injured, mostly with gunshot wounds, said Jim Anthony, a spokesperson for the NorthShore University HealthSystem. The 26 victims taken to the Highland Park hospital ranged in age from 8 to 85, said Brigham Temple, an emergency room doctor.
Police confirmed they captured 22-year-old Robert E. Crimo III, who was from the area. They said he was driving a silver 2010 Honda Fit automobile.
The Lake County Sheriff's Office posted an online wanted poster of Crimo, showing a thin-faced bearded man with facial and neck tattoos. It said he weighed 120 pounds (54 kg) and was 5 feet 11 inches (1 meter 80 cms) tall.
They said he was driving a silver 2010 Honda Fit automobile.
Officials said a rifle was recovered from the scene.
Crimo appears to have published several self-made rap songs using the artist stage name "Awake The Rapper."
The shooting caused toddlers to abandon tricycles and parents to run for safety with their children, turning a civic display of patriotism into a scene of panicked mayhem.
Police did not have a motive for the shooting.
The shooting comes with gun violence fresh on the minds of many Americans, after a massacre on May 24 killed 19 school children and two teachers at an elementary school in Uvalde, Texas, which followed a May 14 attack that killed 10 people at a grocery store in Buffalo, New York.
Illinois Governor J.B. Pritzker called for an end to mass shootings after six people were killed and dozens wounded.
"The President agrees with me: This madness must stop," Pritzker told media.
U.S. President Joe Biden called for a moment of silence amid celebrations for the U.S. Independence Day, after the incident that turn a civic display of patriotism into a scene of panicked mayhem.