With less than five hours to spare last night, Chrysler Corp. completed a $26 million deal with General Electric Co. as firms across the country struggled to meet a key midnight deadline governing retroactive sales of corporate tax breaks.

"We are very pleased with this transaction," a relieved R. S. Miller Jr., Chrysler treasurer and executive vice president for finance, said as the transaction was announced at 7:40 p.m.

While representing a significant cash boost to the automobile maker operating on a thin edge of solvency, the price paid to Chrysler for its tax breaks appeared to be lower than other transactions involving firms that are unprofitable, but in less danger of bankruptcy.

The market in corporate tax breaks was created by the 1981 tax bill. It permitted companies with little or no profits--and consequently in no position to take advantage of credits and depreciation--to sell the breaks to profitable firms through paper transactions called "leases."

In a related development, a spokesman for Amtrak disclosed that the railroad sold its tax breaks through a leasing deal, but he was unable to identify either the buyer or the price. Larry Gilson, the Amtrak vice president for capital development who negotiated the deal, left for a Florida vacation and was unavailable for comment.

The Chrysler deal was touch and go right to the end. The provision in the 1981 tax bill had been written in part with beleaguered companies such as Chrysler in mind, but on Oct. 20 the Treasury issued regulations that effectively killed the market for Chrysler.

The regulations said that the buyer of tax credits and depreciation rights from a firm that later went bankrupt faced significant tax penalites. Earlier this week, the Treasury, under intense pressure from Chrysler, amended the regulations, largely eliminating this threat to the buyer of tax breaks, but it was not at all clear until last night that the amendment was made in time to make a deal possible for Chrysler before the Nov. 13 deadline.

The deadline was created by a grandfather section of the law that allows companies to convert all investments made from July 1 through Aug. 13--the day the law was signed by President Reagan--into leases. Starting today, companies will have 90 days to make the conversion.

Chrysler's Miller said the tax sale to GE involves "substantially all" the firm's purchases of machinery, tooling and equipment through the first three quarters of this year. The total value of the goods is in excess of $100 million.

The leased machinery, tooling and equipment will be transferred for tax purposes to GE, although the transaction was made through a subsidiary, General Electric Credit Corp. It was arranged by Dean Witter Reynolds Inc.

In a related development, C.I.T. Corp., a subsidiary of RCA Corp., announced a leasing plan designed to build up its lending business with small and medium-sized firms. Because of the complexities of the law as accountants, lawyers and other middlemen struggle to make sense of the new transactions, small firms to date largely have been left out of the market in the sale of corporate tax breaks.

C.I.T. is offering to give an automatic 16.1 percent write-off on equipment purchases of $100,000 or more to firms willing to give up the tax breaks on the aquisitions.

A spokesman for C.I.T. said the lending company then will find profitable companies that want the tax breaks and convert the purchases into "leases" under the 1981 legislation. The spokesman said that for an unprofitable company that cannot use the tax breaks, the 16.1 percent reduction is the equivalent of having the rate on a 20 percent loan reduced to 11.97 percent.

In another deal announced yesterday as the deadline approached, International Business Machines Corp., in its fourth major purchase of tax credits and deductions, will get the tax breaks on about $200 million worth of aircraft purchased this year by Pacific Southwest Airlines. No price was disclosed, but it probably is in the range of $50 million.

Earlier this month, IBM and Ford Motor Corp. announced what was the largest publicly disclosed deal: the purchase by IBM of the tax breaks on just under $1 billion worth of equipment for between $100 million and $200 million.