Joseph A. Califano Jr., who was a $550,000-a-year layer before he was hired -- and then fired -- as President Carter's first secretary of Health, Education and Welfare, said yesterday that he will open a new Washington law firm.

Califano's decision ends months of speculation that he would run for a U.S. Senate seat from New York. Califano said in a telephone interview yesterday that he has definitely ruled out such a race.

The new law firm will be a general law practice with emphasis on First Amendment work and on representing large institutions on major social issues, Califano said.

Joining Califano as a senior partner will be Ben W. Heineman, one of the young lawyers who worked for him at HEW and who has been trying to persuade him to open his own firm. A third senior partner has been chosen but will not be named until later.

The decision means that Califano will not be returning on the firm of Williams & Connolly (formerly Williams, Connolly & Califano), where he worked before joining the Carter administration, despite the hopes of senior partner Edward Bennett Williams that he would return.

Califano had run the administrative side of the firm for Williams -- something it is thought he would prefer not to do again except in his own firm. Califano earned $550,000 at the firm in 1975, compared with his $66,000 salary as HEW secretary.

A former White House aide to President Johnson, Califano took over the helm at HEW in January 1977. He was fired last July during Carter's Cabinet shake-up -- an event that sent angry tremors through Washington's liberal establishment.

Califano subsequently said that Carter told him he was fired because, among other things, he couldn't get along with Hamilton Jordan and other top presidential aides.

Carter then let it be known that he thought Califano was lying and that he hadn't really said that at all.

In any case, Califano has been at Cape Cod since then, writing a book about his 30 months at HEW. Its working title is "Your Life and Mine," and it will tell, he said, "what it feels like to sit at a desk and have to decide issues like abortion, and civil rights." He received a $100,000 advance for it.

Califano said yesterday that he expects to finish the book by the end of the year, but that no publication date has been set yet by its publisher, Simon and Schuster Inc.

Asked about his position for the 1980 presidential election -- and specifically about his choice between Carter and Sen. Edward M. Kennedy (D-Mass.) -- Califano said he would not discuss the election for a while.

Califano had been widely rumored, even before leaving HEW, to be a possible Democratic candidate for the U.S. Senate seat in New York now held by Jacob K. Javits (R-N.Y.) Javits, who is up for reelection in 1980, has not said yet whether he will run again. But Califano said he has though it over carefully and decided that he didn't want to make the race even if Javits does not seek reelection.

Asked if he was disappointed that Califano would not be rejoining his firm, Williams, said, "I'm very happy for him, I really am. Joe and I are best friends and will continue as best friends.

"I have the greatest good feelings toward his new enterprise," he added.