Police said two dozen other people were hospitalized after the shooting in the city of 30,000, about 40 kilometers north of Chicago.
Gunfire broke out just 10 minutes after the parade began around 10 a.m. Monday, and people ran for cover.
Police said they were searching for the shooter and urged everyone to shelter in their homes.
"On a day that we came together to celebrate community and freedom, we're instead mourning the tragic loss of life and struggling with the terror that was brought upon us," Highland Park Mayor Nancy Rotering said.
The latest mass shooting comes on the day that many Americans consider the most patriotic on the U.S. calendar.
Celebrations across the US
The Fourth of July holiday celebrates the 13 original colonies' decision to renounce British rule and form the United States. Representatives of the colonies voted for independence on July 2, 1776, and two days later, they approved the Declaration of Independence, a document that explained the vote.
Modern celebrations include parades, picnics, political speeches and fireworks.
This year's celebrations mark a return to normal activities in most locations after more than two years of coronavirus restrictions and precautions.
Events that had been canceled for the past two years resumed this year, including Independence Day celebrations in Baltimore, Maryland, and a hot dog eating contest in Brooklyn's Coney Island neighborhood, a long-standing July Fourth tradition for New Yorkers.
Americans also returned to traveling in large numbers. The automobile association AAA predicted 47.9 million people would drive 80 kilometers or more from home over the holiday weekend.
The group also forecast that 3.55 million Americans would fly during the holiday weekend.
The mass of flyers is testing airlines and airports, which have struggled to keep up with demand all season long, leading to flight cancellations.
U.S. President Joe Biden tweeted Monday that "the Fourth of July is a sacred day in our country — it's a time to celebrate the goodness of our nation, the only nation on Earth founded based on an idea: that all people are created equal."
The Declaration of Independence includes the famous passage "We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness."
While the country's founders fought for those rights, they did not apply at the time to Black people, who had to wait until the adoption of the 13th amendment in 1865, when slavery was abolished.
Biden and first lady Jill Biden hosted a Fourth of July barbecue for military families on the South Lawn of the White House Monday afternoon. In the evening, they are expected to watch the fireworks display at the National Mall, considered one of the country's largest.
Some information in this report came from the Associated Press.