The two top officials of the Chicago Board of Trade Clearing Corp. have been forced out as a result of a federal investigation of allegations of illegal campaign contributions to several 1982 election campaigns.

The clearing corporation, which does the accounting work for the Chicago Board of Trade, allegedly reimbursed employes for supposedly personal contributions they made to reelection bids of several Democratic congressmen, sources familiar with a grand jury investigation said. The sources said there is no evidence that the legislators or their campaign officials knew, or could have known, if the contributions were illegal.

Under federal law, corporations are not allowed to make campaign contributions, nor can an individual or company give funds to someone else to make a campaign contribution. The Federal Bureau of Investigation and the Internal Revenue Service have been involved in the grand jury investigation, sources said.

The sources familiar with the investigation said they could not explain why the former top executives of the clearing corporation, who resigned last week, would have felt the need to make campaign contributions. Unlike the Board of Trade that it serves, the clearing corporation has almost no vested interest in political decisions.

The corporation is a separate organization with a different board of directors and staff, but it exists only to perform the accounting-related functions for trades that are executed on the Chicago Board of Trade, the biggest commodity exchange in the world.

The Board of Trade and its members do have a political stake in many congressional decisions, and the board's officials have passed along political contributions from its members. But sources close to the Chicago probe said investigators and a grand jury have found no irregularities in contributions funneled through the Board of Trade itself.

Sources said that former clearing corporation president Walter W. Brinkman and former executive vice president James E. Johnson are targets of the grand jury probe. The clearing corporation itself is also a target.

Sources close to the Board of Trade said that the clearing corporation gave Brinkman an extended contract even when it knew a probe was going on, because executives felt the amount of money allegedly involved was so small that the company and its executives would at most get a "slap on the wrist" from the federal government.

The total contributions allegedly amounted to about $25,000 -- most of it elicited in $250 checks. A source close to the clearing corporation said that, about 10 days or so after a solicited employe made a contribution, the employe would receive a separate "bonus" from the clearing corporation that would make the employe whole. The bonus would be big enough to cover not only the contribution, but also any taxes the employe would owe on the additional income.

Among the legislators who received checks from Board of Trade Clearing Corp. employes were Rep. Peter W. Rodino Jr. (D-N.J.), chairman of the House Judiciary Committee; Illinois Democratic Reps. Frank Annunzio and Marty Russo; Rep. Gillis W. Long (D-La.); and former representative Leo C. Zeferetti (D-N.Y.).

Sources said many of the lower-level employes who made the initial contributions appeared to be unaware that the clearing corporation allegedly was making illegal contributions, and most of the employes themselves do not appear to be targets of the federal probe.

A spokesman for the Commodity Futures Trading Commission said that the agency, which regulates commodity trading, was aware of the FBI investigation. But the spokesman said that, because the probe doesn't involve the functions of the clearing corporation itself, the CFTC has no role in the investigation.