A black former U.S. attorney, a former state House speaker and a former state Democratic Party chairman are seeking the Democratic nomination to succeed retiring Rep. L. H. Fountain, in a contest accompanied by a recent surge in black voter registration.

The increase in the number of black registered voters is enough to make H. M. (Mickey) Michaux Jr., a Durham lawyer and businessman who was appointed a U.S. attorney by President Carter, the front-runner in the primary scheduled for June 29.

His two white opponents, James E. Ramsey of Roxboro and I. T. Valentine Jr. of Nashville, are competing to force Michaux into a runoff on July 24.

Fountain, a conservative Democrat who has represented North Carolina's second district in Congress since 1952, announced that he would not run for reelection shortly after the state legislature added urban Durham County to his largely rural district. The district, which is in the north central part of the state, also includes Chapel Hill, home of the University of North Carolina.

The legislature recast the second district in response to the Justice Department's rejection of its original congressional redistricting plan on the ground that it diluted the voting strength of blacks.

Since March 31, 18,000 people have registered to vote in the 10 counties in the district, 12,500 of whom are blacks. Consequently, in that two-month period, blacks rose from 33 percent to more than 36 percent of the total of Democratic voters.

Black voter registration has been stirred not only by Michaux's candidacy but also by the fact that black candidates are running for local offices in most of the district's counties and voter registration efforts by national black groups.

Most significant, however, is the aggressive state-wide voter registration drive by the state Board of Elections, controlled by appointees of Democratic Gov. James B. Hunt Jr. The drive is seen here as part of the preparation for a potential Hunt challenge to Republican Sen. Jesse Helms in 1984.

The race revolves around geography and political alliances more than ideology.

Valentine--his initials stand for Itimous Thaddeus, but he is known as Tim--has the support of many of Fountain's political backers. His base is in the Rocky Mount-Wilson area in the eastern sector of the district.

Valentine has been endorsed by the state medical society's political action committee and by former governor Dan K. Moore. It was during Moore's term as governor in the mid 1960s that Valentine served as state Democratic chairman.

Valentine campaigns as a fiscal conservative. But he also favors giving up the third year of President Reagan's tax cut, says the budget should be cut so as to "do the least amount of damage to those social programs" and opposes efforts to strip federal courts of authority on social issues.

Ramsey's base is the strip of rural, tobacco-growing counties along the Virginia border. Ramsey served two years as speaker of the state house in the early 1970s.

In a district in which the median family income falls below state and national averages, Ramsey campaigns on a pledge to use his congressional office to help hunt industry to provide jobs for the area.

Of all the candidates, Ramsey offers the strongest support to the Reagan economic policy. In addition, he favors a plan to phase Social Security into a voluntary program. Ramsey also supports a freeze on nuclear arms production.

Michaux, who had begun to run for Congress before Fountain decided to retire, has a strong political base among blacks in Durham and across the district. He is the most critical of Reagan, calling Reaganomics "a wrecking ball approach to the economy," and has been endorsed by the state teachers' political committee.

In a considerably quieter campaign than the Democratic contest, three Republicans are seeking their party's nomination. They are F. Douglas Biddy Jr., a corporation executive in Durham, Barry L. Gardner, a telephone company engineer in Rocky Mount, and Jack Marin, a Durham attorney and former professional basketball player.

Marin was encouraged to run by the National Congressional Club, the political organization of Sen. Helms. The club has signaled that it would back Marin in the general election campaign.