Raymond L. Dirks, the Wall Street broker who built John Muir & Co. into one of Wall Street's hottest firms, went on trial today on civil charges of securities fraud growing out of one of the firm's underwritings.

The Securities and Exchange Commission charged that in December 1980, Dirks and other defendants agreed to use $2.5 million raised from a $4.8 million underwriting of Cayman Islands Reinsurance Corp. to buy stock from other Muir underwritings that had not been sold.

In his opening remarks before U.S. District Court Judge William C. Connor, Dirks' attorney, Stanley Arkin, said that his client had relied on the advice of attorneys who reviewed the offering prospectus.

"Mr. Dirks was ready to do whatever the lawyers suggested," Arkin said. The attorney also said that Dirks did not become a partner of Muir until three months before it collapsed in August 1981, long after the Cayman deal.

But the government maintains that Dirks, in fact, ran the firm for two years.

In recent weeks, Cayman and three other defendants have settled with the commission. Dirks and Michael C. Scott, the former chief executive of Cayman, were both scheduled to go on trial today.

Scott, however, did not appear today for the trial and the judge said he would consider issuing a warrant for Scott, who is a Canadian citizen.