The Securities and Exchange Commission yesterday accused one of the nation's most prominent takeover brokers of illegally profiting from insider trading in the stocks of companies he was negotiating to buy.

The takeover specialist, Ira J. Hechler, director of special acquisitions for Oppenheimer & Co. agreed to repay $145,000 in stock trading profits and signed a consent agreement to settle the SEC complaint.

The SEC formally censured Oppenheimer, one of the biggest investment banking and brokerage firms, for failing to adequately supervise Hechler.

Also named in the SEC action was Hechler's brother-in-law, Murray Hirsch, who was accused of profiting from Hechler's insider secrets.

As a consultant to Oppenheimer since 1975, Hechler had free reign to target, research and negotiate takeovers and buy-outs of publicly owned companies for the Wall Street firm.

In seven cases, the SEC charged, Hechler bought stock in companies that he was negotiating with, then sold the shares at a profit when the stock price increase after the negotiations were revealed to the public.

Among the insider dealings cited by the SEC is Hechler's role in arranging a tender offer for control of Reliable Stores Corp., the Baltimore retailer that owns the Hub furniture stores in the Washington area.

In the spring of 1977, the SEC charged, Hechler approached Reliable Stores' management about purchasing the firm's assests. After tentatively agreeing on a $14 per share purchase, Hechler bought more than 5,000 shares of Reliable stock at prices raning from $10 to $10 3/8 per share.

The tender offer was eventually made at $16.50 a share. Hechler sold his stock at a $21,429 profit.

To settle the SEC complaint, the takeover broker agreed to pay back the Reliable stock profits and other earnings from trading shares of Alterman Foods, Albert's Inc., FAB Industries, Inc., Spartek Inc., Mohawk Rubber Co. and Reading Co.

In the FAB Industries negotiations, the SEC charged, Hechler failed to complete the deal to buy the company, but nonetheless made a $5,5800 profit trading FAB shares.

The SEC charged that Hechler's trading in stocks in which he was involved in takeover negotiations were illegal because he had access to information that was not available to the general public.

Hechler's brother-in-law also bought stock based on conversations the two men had, the SEC charged. Hechler's stockbroker also tipped the brother-in-law to companies Hechler was investing in, the agency claimed.