Former Gov. James B. Longley of Maine, a businessman who became an outspoken independent in politics and who cut his state's unemployment rate and reduced its per capita tax burden, died of cancer Saturday at his home in Lewiston, Me. He was 56.

A successful insurance broker and tax expert by profession and a former Democrat by choice, Gov. Longley astonished political observers in his own state and elsewhere in 1974 when he upset Republican James Irwin and Democrat George Mitchell to win the statehouse.

He thus became the first independent governor in the United States in half a century and the first Irish Catholic ever to win the office in Maine. h

He vowed he would serve only one term and he kept his word. Such was the record that he made that candidates to succeed him when his term was up in January 1979 declined to criticize his policies. At the same time, each courted an endorsement from him and he declined to give it.

"I am a businessman, and I will continue to think and act like a businessman as long as I am governor," he said in a newsletter to constituents early in his term. "I do not have the flair nor the penchant for the traditional approaches of a public officeholder who has been moulded and conditioned by the political system. Nor do I want to act the part . . ."

The result of his "businessman's" approach was a series of notable clashes with members of the state legislature. When he became governor, he demanded undated resignations from department heads. These were refused and some firings followed. He vetoed more legislation than any governor in Maine history -- 49 bills in 1977 alone, 22 of which were overridden.

But during his last year in office, Gov. Longley pushed through a bill providing for $40 million in tax rebates. He also attracted new businesses to Maine's chronically depressed economy, helped settle a claim by Indians for about one-third of the land in the state, and cut the unemployment rate in half.

Admirers credited these successes to his tough, businesslike policies. Detractors claimed that he simply had been the beneficiary of a generally improving economy.

Despite the intensity he brought to his job and his occasionally high-handed methods, Gov. Longley was a man without pretension. He declined the traditional inaugural ball at the beginning of his term and was known to stop his official limousine to help motorists stuck in the snow.

As his term drew to a close, Gov. Longley declined to lay to rest speculation that he would run again. There also was talk that he might become a third-party candidate for national office. But he went back to his insurance and investment business in Lewiston and confined his political activity to supporting a national conservative movement to force a balanced federal budget.

Although he was a registered Democrat for many years and supported former Sen. Edmund S. Muskie, now the secretary of state, in the conventional way, Gov. Longley's only statewide political exposure before his election had been as a member of the Maine Management and Cost Survey Commission.

This was a state-authorized group of businessmen convened to suggest ways to make the state government more efficient. It recommended changes that its members said would save $23 million a year.

In an interview with The Wall Street Journal a year after he had taken office, Gov. Longley said he had decided to run for governor out of frustration that virtually none of the commission's recommendations had been adopted. He said he had "a deep feeling that we are falling apart in our own government" and that businessmen should take an active part in politics rather than merely support candidates with their checkbooks.

The future governor campaigned all over the state in a camper that aides said often was on the road 21 hours a day. Most of his volunteers were young people, his organization was minimal, the polls had him running a dismal third, and his campaign slogan was "Think about it."

On election day, he won 39 percent of the vote, beating Mitchell, the Democrat, by 10,000 votes. Irwin, the Republican, ran a distant third.

"Don't let the odds or the polls scare you," he once advised independent candidates. "I didn't."

Gov. Longley was born in Lewiston, Me., into the family of a streetcar conductor. His father died when he was 15 and he went to work in a local dye factory to help support the family.

He recalled in an interview with The Washington Post that a brother made him return to high school. During World War II, he served in the Army Air Force. He then entered Bowdoin College, from which he graduated in 1947 after completing the four-year course in about two years.

While in college, he had so many jobs that one year he was able to send $5,000 home to his family, he said. After Bowdoin, he went into the insurance business in Lewiston. He also studied law at the University of Maine and eventually earned a degree. He specialized in tax law. He was so successful in insurance that he was elected president of the Million Dollar a Year Club.

Gov. Longley played football while he was at Bowdoin. "I wasn't any good," he once said. "I just don't quit."

Gov. Longley's survivors include his wife, Helen, and five children, Jim, Sue, Kathy, Steve and Nancy.