Gov. Mills E. Godwin will retire from public life Saturday after two terms as a chief executive who emerged from a career as a segregationist leader to engineer some of Virginia's most progressive legislation.

In his first term from 1966 to 1970, Godwin was responsible for pushing through a sales tax that financed new education programs at a time when Virginia ranked among the lowest of states in its quality of education. He worked to pass the state's first bond issue to finance construction of mental hospitals and colleges. By contrast, his second term, spanning the recession of 1973-74, is often described as mediocre.

However, senior legislators and scholars specializing in state government agreed in interviews last week that Godwin should be ranked with the late Harry F. Byrd, governor during 1926-30, as one of the two strongest Virginia executives of this century.

Inseparable from Godwin's governing skills has been a political philosophy and style that has seemed always to be in rhythm with the conservatism of the Virginia electorate.

He not only survived the civil rights movement as a segregationist and the social disharmony of the late 1960s as a Nixon supporter who likes to make speeches about the importance of business profits, but he also managed to retain most of his political support when he found it necessary to switch from the Democratic to Republic Party in 1973.

Godwin's formal, almost regal manner tends to impart a sense of propriety to everything he does, but his policies, especially in his second term, have come in for severe criticism. Northern Virginians wanted more money for Metrorail construction. Teachers and other public employees were bitter but helpless over being denied collective bargaining rights by a Godwin lawsuit. And black Virginians cannot forget his leading role as a segregationist in the 1950s and his failure as governor to appoint blacks to top government jobs.

Feminists also are aware that in two terms spanning a decade of rising expectations by women, Godwin has included just as many women as blacks in his circle of top advisers and agency policymakers - exactly none.

It has become conventional in the last three years to say that Godwin's achievements ended with his first term - Virginia governors cannot succeed themselves - and to conclude that he ran again in 1973 only because the state's conservative political leaders persuaded him he was the only one who could deny the governorship to Henry E. Howell, his arch political foe.

The editors of the Almanac of American Politics in 1976 called him "perhaps the least active chief executive in the nation." They labeled his second administration a "do-nothing term" and said his election amounted to a takeover of the moderate and progressive Republican Party by the old conservative establishment in Virginia.

State government scholar Larry Sabato of Norfolk takes the same approach to Godwin in a book to be published this year on the governorships in all the states during the last 25 years. Sabato, a consultant to the Howell campaign in the last election, ranks Godwin in his book as an "outstanding" governor, but in a footnote says the rating is based only on the first term. The second term he calls "lackluster."

Godwin and others in the government dismiss this kind of criticism of his second term by saying it is made with total lack of regard for the national recession, changes in public attitudes toward government spending and a series of natural disasters in Virginia that occurred during the administration now ending.

In every year of the second administration, Godwin ordered spending reductions in the budget to compensate for overoptimistic revenue projections. He tried in 1976 to get the Assembly to approve a $96 million tax package, including a new tax on coal production, but got only $25 million of it. In 1977, smarting from the rebuff of the previous session, he signaled his willingness to approve almost any tax the Assembly passed, but in an election year for the 100 House members, no tax bill had a chance.

Some of the most notable acts of the second term were divisive ones. They proved that Godwin was still very much in control but they embittered so many people that even he is cautious about celebrating them as achievements.

He and his highway lieutenants hung on tenaciously even after one federal veto to win final approval of the controversial Rte. I-66 expressway between the Capital Beltway and Rosslyn. He won partly on the strength of promises to transfer some interstate highway money to Metrorail construction. Former Secretary of Transportation William T. Coleman, who once blocked the highway, then finally approved it, referred wryly to the Godwin fund transfers as "whitemail." Coleman is black.

Godwin did what he had to for Metro to get I-66, but he succeeded in preventing the state from drifting into even the appearance of an open-ended commitment to help finance the rapid transit rail project. For this, he was much criticized by some Northern Virginians, especially former House Majority Leader James M. Thomson of Alexandria.

Godwin has always explained his opposition to Metro grants as being based on his judgments that there is no feasible plan for building it at a cost Northern Virginia could afford. He has said recently that he feels vindicated by the increasing efforts of the Carter administration to force reductions in Metro construction costs.

Perhaps the most remarkable stroke of Godwin's second term was his state court suit that ended collective bargaining between public employees unions and local governments. The Assembly had demonstrated that it was unwilling to legislate for or against collective bargaining, and union contracts were becoming commonplace in urban areas of the state.

Godwin contended, and the state Supreme Court unanimously agreed, that all such bargaining is illegal without specific authority from the General Assembly. No one believes the Assembly will approve bargaining in the foreseeable future.

While it was not by Godwin's own assessment a term of expanding services, he did preside in his last months over the state's second modern bond issue, this one for $125 million in prison, college, port and park funds.

The largest program expansion and most significant administrative changes during his second term were in the state's prison system.

In the last four years, a 50 per cent increase in prison capacity has been funded and Godwin, with former U.S. prisons official Fred B. Wilkerson, has installed a firm if conventional corrections administration. Disorders have been infrequent and the escape rate was cut 82 per cent, from 106 to 19, per 1,000 inmates.

Godwin's administrative style has remained unchanged through two terms, those who have worked closely with him say. Major decisions flow from judgments reached by him and a few advisers who are publicly uncommunicative.

Others who have worked with Godwin closely point to his strength.

Recalling Godwin's imposition of controversial fuel rationing orders last winter, Democratic Attorney General Anthony F. Troy said, "I have seen the man withstand a lot to stick by decisions we thought were best for the state.He was under terrific pressure from some close friends to make exceptions to the fuel orders, but he never caved once.If he had, he would have had no respect for the whole program."

Among those who rated Godwin as one of Virginia's two strongest governors of the century so far, only Sabato placed great emphasis on the difference between his two terms. House Speaker John Warren Cooke, the longest serving member of the Assembly, and House Majority Leader A.L. Philpott, possibly the most influential single member of the Assembly, said they see no validity in the two-term comparison because of the difference in the economy and public expectations during the second administration.

Del. William P. Robinson, political science dean at Norfolk State College and in recent years the only black member of the House, also said he felt Godwin managed the state as well as could be expected during the last four years.

Robinson praised Godwin's "capacities" and said that only his failure to bring blacks into a full role in the government kept him from being a "truly great governor."

"We thought at one time he would do it," Robinson said. "Back in 1964, when he and other Byrd leaders supported Lyndon Johnson, we thought a change was coming. In response to this, we backed Godwin in his 1965 campaign. We got some strong criticism for supporting a leader of massive resistance, but I thought it was the practical thing to do.

"Then, the day after the election, he put his statisticians to work to prove that the black vote had not provided his margin of victory when it was plain that it had. I knew then that nothing had changed."

Sabato undercut his own two-term analysis of Godwin in an interview by suggesting that his first-term accomplishments have been overstated. "Increasing support for education with the sales tax and building the community college system were progressive steps," he said, "but they were steps that almost everyone else in the country had already taken. It was not a matter of breaking new ground," Sabato said.

Godwin is 63 and has said repeatedly that he will never run for public office again. He has said he will again become a member of several corporate boards and live at his home on the Nansemond River in Suffolk not far from his farm home birthplace.