The bitter Illinois Senate race between Republican Sen. Charles H. Percy and Democratic Rep. Paul Simon is ending in a dead heat after months of increasingly muddy slogging.

The latest opinion surveys show Percy clinging to a narrow lead among Illinois voters. But his margin apparently is eroding even while President Reagan continues to enjoy a wide lead over Walter F. Mondale.

Percy has a seven-point lead over Democratic challenger Simon, 49 to 42 percent, in a Gallup Poll for the Chicago Sun-Times and Channel 5 (WRC-TV). But the poll shows a trend toward Simon among previously undecided voters.

If late movements are factored in, Percy's margin shrinks to 2 points, 51 to 49 percent. This places the race in the category of too-close-to-call and suggests that Simon has achieved new momentum at the finish line.

Both men are seasoned politicians, well-known to Illinois voters as low-key campaigners. But in this contest, they came out slugging, each trying for a knockout blow against a formidable opponent.

Percy, 65, trying for a fourth term, moved away from his trademark moderate Republicanism to ally himself closely with Reagan. He has denounced Simon as a pro-tax, high-spending Democrat. Simon, 55, has hit back, calling Percy a defender of untaxed industries.

Economic issues are of major importance here, for Illinois' heavy industry has not kept pace with the national economic recovery. On Friday, unemployment in the state moved upward, to 9.4 percent for October from 8.7 percent in September, adding 45,000 more jobless workers to the state's rolls and bringing the total to 529,000.

When Percy called the new figures a "temporary blip," Simon jumped to the attack, accusing Percy of callousness toward the unemployed. As the weekend passed, the two were slugging hard at each other on the issue, in keeping with their brawling tactics throughout the race.

The strategy has yielded more than $2 million in heavily negative television blitzes by both sides. But the results may have canceled each other. Both candidates are relying on traditional constituencies for their core support. Simon, a four-term House member from southern Illinois, has strong appeal among blue-collar workers, urban blacks and liberals. Percy's strength lies in the heavily white suburbs. Percy has lost substantial support among Illinois Jews for backing U.S. arms sales to Arab countries, which Simon has consistently opposed.

Percy supports Reagan's "Star Wars" defense effort, and backs the MX missile and the B1 bomber. He has repeatedly attacked Simon as "soft" on the country's defense for opposing those programs.

In other foreign-policy issues, Simon, 55, favors a mutually verifiable nuclear weapons freeze and decries Percy's support for the administration's avowed "build-down" approach to reducing the superpowers' strategic arsenals.

They have clashed on the U.S. role in Central America, with Percy defending aid to Nicaraguan "contras," and Simon opposing it.