The hiring of Ian MacGregor of the Laz ard Freres investment bankers in New York, a Scottish-born American, to rescue the ailing government-owned British Steel Corp. has caused an uproar here.

The fact that he is an outsider and that British taxpayers will owe Lazard Freres up to $4 million compensation for hiring away MacGregor have stirred strong opposition to the appointment in both trade unions and Parliament.

Even The Times newspaper, a strong supporter of Conservative Prime Minister Margaret Thatcher, declared flatly today that her industry secretary, Keith Joseph, had made a mistake in agreeiing to pay so much for MacGregor at a time when Thatcher is trying to force Britain to accept several years to austerity.

Joseph defended the arrangement in Parliament as the price necessary to obtain an able executive to shake up British Steel. The giant firm lost more than $1 billion last year and is already committed to a cost-cutting plan that would close several of its huge plants and eliminate a third of its 150,000 jobs.

Thatcher also said through a spokesman today that she was "ebullient" about landing MacGregor. She said suggestions that the government should have settled for "second-best" by paying less exemplify "what is wrong with British industry."

MacGregor, 67, is credited with building the American firm AMAX into a leading diversified mining and metals conglomerate before joining Lazard Freres. At a press conference here today, he promised to work "eight days a week" to turn British Steel into a profit-making concern during his three years as chairman.

He started today as deputy chairman, commuting from New York, and becomes chairman and "chief operating officer" in July..

Asked about his age, MacGregor said he expects to "outlive" his three years at British Steel and "to be gainfully employed after that."

He indicated that he would continue the plant- and job-trimming plan and try to diversity and decentralize the steelmaking giant, which was formed by nationalizing a number of smaller firms in 1967.

To compete with the Japanese steel industry's "superplants," the British goverment later embarked on a $6 billion investment program that more than doubled British Steel's capacity with similarly huge, ultramodern plants. But in heavy competition for a shrinking world market, orders failed to keep up with the added capacity and British Steel lost nearly $3 billion on top of the new investment.

Labor union leaders went along with a previous cut of 20,000 jobs to try to improve productivity per worker but have rebeled at the proposed new job cuts and management's refusal to allow workers salaries to keep pace with Britain's soaring inflation rate.

A 13-week strike that ended April 1 cost British Steel another 10 percent of its market and losses of more than $20 million a week. The strike also left labor-management relations and company morale at their lowest levels ever. l

Asked today if he thought British Steel could be turned around in just three years, MacGregor said, "I have to ask our friends in the trade union movement if they are prepared to do that. If they are, then I think we can do it."

MacGregor pointed to his "broad experience in industrial relations. I worked from my earlier days on the shop floor and I feel quite at home there." w

He promised to "look for and try to encourage the participation in seeking future goals for the company on the part of everyone in the business, not just management. That has been my practice in the past."

Thatcher's government has made no secret of its desperate search for a bold executive to replace the present British Steel management, in whom it had lost all confidence during the steel strike.

Several British executives turned down government offers to take the job.

"I feel a certain attachment to my old home," said MacGregor, who maintains a vacation house in Scotland. "I felt that if no one else would do it, then I would."

MagGregor acknowledged that he will be taking a big pay cut. His total earnings in New York were estimated at nearly a million dollars a year. At British Steel his salary will be about $100,000, plus at least as much more for the investments and directorships he retains in the United States.

But Industry Secretary Joseph has committed the government to paying about $1.5 million compensation to Lazard Freres, with whom MacGregor will remain only a limited partner and shareholder.

The government also will owe the New York investment firm up to $2.5 million more, depending on how much success MacGregor achieves in turning British Steel around. The judge of the amount of this additional payment it to be an unprecendented oversight committee made up of British government and Lazard Freres officials.

Joseph's explanation of this arrangement was greeted with loud laughter and shouts of outrage from both government and opposition benches in Parliament.

Other members of Parliament and British newspapers compared it derisively to the "transfer fee" in sports -- the compensation paid by teams for star athletes wooed away from competitors.