Away from this affluent Chicago suburb, Rep. Abner J. Mikva (D-I11.) is the darling of American liberals. Common Cause members all but gush when his name is mentioned. Henry Fonda sings his praises in television commercials. And some Harvard professors even treat him as an equal.

But back here in his district, Ab Mikva is in deep trouble - and for precisely those and same reasons. In a time of tax revolt and inflation squeeze, Mikva still supports liberal social programs and "tax reform" legislation. As chairman of the liberal Democratic Study Group in the House and leader of the "reformist" block on the House Ways and Means Committee, he is the quintessential liberal. And in Chicago's rich North Shore area, that isn't winning him many points.

This is capital gains country. Prim, tree-lined suburbs with well-kept, often stately homes. Investment bankers who ride the train (not the E1, thank you) to Chicago at 6:32 a.m. Average household income of $28,000. And a firm belief that the government is driving them into hock.

So it is that John Edward Porter, a handsome, previously little-known 43-year-old former Republican state legislator and son of an Evanston judge, is making deep inroads by branding Mikva a big spender and an opponent of tax relief.

As oddsmakers are figuring it now, the race is too close to call.

There's no doubt that inflation and high taxes are the big issue in this campaign, or that they're working effectively against Mikva. Not only has he supported traditional Democratic social programs, but he also tried hard to head off this year's reduction in capital gains taxes - a no-no among wealthy North Shore estate owners.

Harry Simpson, a conservatively dressed commuter from nearby Winnetka, sums it up suceinctly for much of the well-heeled 10th District: "Mikva's just been giving the country away." As for the incumbent's record on taxes: "I don't know, but it can't be good."

The question is, to what extent will this attitude prevail in the more middle-income and occasionally blue-collar - western section of the district, which both sides expect will provide the swing vote in Tuesday's election. And will voters turn out to express their discontent?

The district essentially is divided into two major parts - the super-affluent WASPish lakeside suburbs and the partly blue-collar, heavily Jewish westcentral region. Porter has the lakeside area pretty well locked up, and Mikva still appears reasonably solid in the westcentral section.

The fight is over how much each candidate can chip away at the other's base, and over the remaining turf in the far western portion of the district. The outcome is difficult even for the candidates to predict. The western areas contain a mixture of Republicans, blue-collar workers and transients, who could go either way.

This isn't the first time Mikva has been enshrined by liberals across the country and in trouble here at home. His victory margin in the 1976 election was 201 votes out of 213,000 cast. In 1972 he lost his seat - a casualty of the Nexon landslide - by 2,500 votes.

Perhaps Mikva's biggest setback was Illinois' congressional redistricting in 1971, which propelled him from the heavily liberal, semi-urban Hyde Park section of Chicago to the more traditionalist North Shore area, which had been represented by conservative Republican Philip M. Crane.

Says James A. Bovaird, a Winnetka stockbroker with a grasp of local politics: "Mikva has done a fine job as a congressman, but it's a case of whether the hand fits the glove. John Porter was born and bred here, and Mikva has the label of a big spender. Abner is running the race of his life."

The same theme is being sounded by Porter, who gingerly takes pains to praise Mikva's "intellect and hard work" before lambasting him for not being tough on inflation. (Ironically, the two opponents are neighbors, their homes - both large and well-appointed - being barely a block apart.)

Like many Republican candidates, Porter relies heavily on this year's standard GOP solutions for the nation's economic ills: a Proposition 13-style "spending cap" combined with further reductions in income and capital gains taxes, a tax credit for college tuition costs and tighter money and credit policies by the Federal Reserve Board.

But Porter is less plastic, and a far better campaigner, than many of his GOP counterparts - good on his feet, willing to play the moderate on "social issues" and not afraid to bid for votes in Mikva's traditional strongholds. On Sunday, for example, he appeared at a synagogue and a Cuban-American social club.

Mikva tries to diffuse Porter's "big-spender" charges by disputing them and arguing that they won't be deciding factors. "I'm not for inflation, and neither is anyone else," he says. "But once you've said that, there's very little more to do. People relate more to whether they think a candidate is competent or not."

He also keeps citing vote tabulations by the National Taxpayers Union and the now-defunct Chicago Daily News ranking him as one of the toughest spending cutters (and stingiest spenders) in the Illinois congressional delegation. In these, Mikva comes out just behind Crane, an announced 1980 GOP presidential candidate.

Over the past several months the contest has turned into one of the most costly - and celebrity-laden - in North Shore history. Besides Fonda, Mikva has lured Vice President Mondale and Sen. Edward M. Kennedy (D-Mass.) for personal appearances, and President Carter will speak on his behalf in a side trip here tomorrow night. Porter has garnered former president Gerald R. Ford and Sen. Bob Dole (R-Kan.).

Both sides concede they've spent record amounts on the campaign. Mikva estimates costs at about $300,000 so far - the most he's spent on a campaign - while Porter figures his at $350,000 and climbing. Some onlookers speculate the tab could top $400,000 each by the time the polls open.

The bulk of Mikva's campaign chest has come from fund-raising dinners - using his celebrities as drawing cards - and from union-affilliated political action groups. Porter's funds stem mainly from business groups. (The National Association of Manufacturers last April pledged $25,000 to whoever won the GOP primary.)

The Mikva-Porter exchange has gotten predictably snippy in recent days. Mikva has radio commercials complaining that Porter has misstated his position. After setting the record straight for his listeners, the incumbent intones: "That's not what my opponent's commercials say, but it's the truth."

The final week also has produced other crosscurrents that could prove decisive. For example, both men are claiming injury from a surprise National Rifle Association missive citing Porter as "immensely preferable." (Porter, who claims he opposes hand-guns as much as Mikva does, fears a liberal backlash.)

Right now, pollsters are giving Mikva a slight edge, betting in part on his acknowledged superior precinct organization (complete with T-shirts and tote bags) and a potentially large turnout of absentee college voters (Mikva has spent years organizing high school students and 10th District students at colleges around the nation).

But both candidates concede that the outcome could depend more on Tuesday's turnout than on philosophy or organizational efforts. Traditionally, 80 percent of the district's 260,000 voters cast ballots - one of the highest turnout rates in the nation.

The conventional wisdom is that a low turnout could hurt Mikva. And this year, both sides concede, voters seem apathetic - and in a foul mood, to boot. At the same time, this year the GOP candidate doesn't have President Ford to help out. Ford's landslide among North Shore voters in 1976 cut deeply into Mikva's support.

With the candidates' polls showing a close race, the remaining six days could prove the most intensely fought. Both Porter and Mikva have scheduled major TV blitzes, and precinct workers are geared up.

Whether this election will prove to be the ultimate referendum on the middle-class economic squeeze, as some pundits have said, remains to be seen. While inflation and high taxes clearly are the big issue in the race, it isn't clear how deeply they'll cut in influencing voters.

Meanwhile, the balance sits in the hands of voters such as Jan Fayhee, who conceded the other day she was undecided. "Not many candidates really are addressing the issue," she said. "I'm still in the process of figuring it out."