Transportation Secretary Elizabeth Hanford Dole recommended to Congress yesterday that the federal government sell its share of Consolidated Rail Corp. to Norfolk Southern Corp., already a major railroad company, and thus get out of the freight railroad business.

If the proposal is approved, the Norfolk Southern-Conrail system would be, at 34,000 miles, the nation's longest, and second to Burlington Northern in freight carried. It would, for all practical purposes, share the nation east of the Mississippi River with one competitor, the CSX Corp., which owns the Chessie and the Seaboard systems.

Sending Conrail "to the private sector, where it belongs" is a pledge of President Reagan's first administration and one he repeated in his State of the Union message Wednesday.

Norfolk Southern, an immensely successful railroad operation that has been sitting on a cash horde, would pay $1.2 billion in cash up front and would surrender almost $2.3 billion of federal tax credits and deductions that Conrail holds.

Norfolk Southern would also agree to convenants guaranteeing that Conrail would be retained as an operating unit, that its employes and shippers would to a large degree be protected from extensive layoffs and abandonments, and that its headquarters would remain in Philadelphia, a key point with an already hostile Pennsylvania congressional delegation.

Conrail, constructed in 1976 from the embers of the Penn Central and six other failing or faltering northeastern railroads, consumed more than $7 billion in tax money before turning the corner under its current management. It reported about a $500 million profit last year, although that includes lower wages for its employes and forgiveness of state taxes.

The bid does not include the uncertainties of stock offerings to the public or a drawdown of Conrail's assets to pay for itself, which would be required by the competing bids, and was the strongest financial package of three Dole was considering. The two losers yesterday were Alleghany Corp., a New York holding company, and an investor group headed by Washington hotelier J. W. (Bill) Marriott Jr. Alleghany and Marriott declined comment.

Conrail's successful management, led by its feisty chairman, L. Stanley Crane, wants the railroad to be sold to the public through a stock offering, a position Dole detests and did not consider after giving it initial study when she began the sales process more than a year ago.

Dole's proposal faces an uncertain future when it gets to Capitol Hill. Opponents of Norfolk Southern were quick to attack the plan, and it has yet to build its own constituency because although it has been widely assumed for weeks that Norfolk Southern was Dole's first choice, the drawn-out selection process gave opponents time to organize.

Conrail and one of its labor unions came out against the sale yesterday, as did Gov. Richard S. Celeste (D-Ohio) and Sen. Arlen Specter (R-Pa.), who said, "The effect on Pennsylvania would be potentially disastrous" and that the purchase price "constitutes the biggest giveaway since the Dutch obtained Manhattan Island for $24."

Specter yesterday morning was cochairman of a hearing on behalf of the Northeast Midwest Coalition. Representatives from Conrail, Marriott, Alleghany, CSX and labor testified, but Norfolk Southern and the Transportation Department were not represented. Dole and Norfolk Southern Chairman Robert B. Claytor and their attorneys were busy dotting i's and crossing t's.

Conrail's labor unions -- whose members have been working for 12 percent less than industry wage rates since July 1981 to help Conrail's financial surge -- had unanimously endorsed the Alleghany proposal.

Fred A. Hardin, president of the United Transportation Union, which represents almost 12,000 of Conrail's 25,000 unionized employes, said, "Rail labor will not speak with one voice. I'm sure there will be some differences of opinion; some are still dedicated to Mr. Crane's fantasy, but we certainly have to recognize that the present secretary of Transportation has been more cooperative with labor than any of the eight I've dealt with."

But Richard I. Kilroy, international president of the Brotherhood of Railway, Airline & Steamship Clerks (BRAC), said a sale to Norfolk Southern "will create havoc in the Northeast and Midwest, devastate the lives of thousands of rail employes, disrupt shippers and destroy competition." He said that "rail labor will vigorously oppose" the proposal.

Norfolk Southern and the other bidders have promised to restore Conrail's employes to industry wage rates retroactive to July 1, 1984.

Conrail management said a sale to Norfolk Southern "would destroy the strong, competitive, financially secure rail system that Congress worked so long to complete."

Much of delay in the decision can be attributed to the Justice Department's six-month study of the antitrust implications of a Norfolk Southern-Conrail merger. Justice concluded there were problems but that they could be solved with the transfer of either track or track use rights to regional railroads other than CSX.

Sen. John C. Danforth (R-Mo.), new chairman of the Senate Commerce Committee, promised "careful consideration" of Dole's recommendation. Rep. John D. Dingell (D-Mich.), chairman of the House Energy and Commerce Committee, said, "In the House, there will be no stampede . . . I intend to see that there is full opportunity for public comment and debate on the difficult and complex issues raised by any transfer proposal."

Rep. James J. Florio (D-N.J.), chairman of the Commerce subcommittee in charge of Conrail and a vitriolic opponent of the Alleghany bid, said he will move swiftly to consider Dole's proposal but will review the other options and "will not approve a sale unless it is a sound one."

CSX Corp. has promised to fight a sale to Norfolk Southern. CSX attorney Mark Aron said at the Northeast Midwest Coalition hearing that CSX would have to abandon track and lay off employes because it would lose traffic to the merged system and that "a great number of shippers will be hurt."

Specter's remarks led Crane to say he favored delaying the sale to see if Conrail could gain in value. There are "possible advantages to doing nothing," Specter said, "something we do well."