Primark Corp. of McLean announced plans yesterday to divest its giant Michigan gas subsidiary, a move that would complete its transformation from an energy firm to a diversified financial services, telecommunications and airplane-maintenance company.

Under the proposed spinoff, the Michigan Consolidated Gas Co. would become a separately owned and managed firm, with its shares distributed among current Primark shareholders and dividends improved. The deal is subject to shareholder approval and a ruling by the Internal Revenue Service that the transaction will not be taxable to any of the parties.

Company officials described the proposal to split the company in two as an effort to increase Primark's appeal to investors, who may now choose between buying stock in a regulated utility or a growing services company.

"We're doing it to enhance shareholder value," Primark Chairman Robert W. Stewart said in an interview yesterday. "The two parts will be greater than the whole."

In the company's announcement yesterday, Primark said that Stewart will retire after the transaction is complete and will be replaced as chief executive by Primark's current president, Joseph E. Kasputys. Stewart declined to discuss Primark's plans after the spinoff.

Wall Street, which has approached Primark cautiously in recent months, seemed to approve of the proposal, pushing its stock price up to $20.50, up $1.75 in New York Stock Exchange trading yesterday. "I tend to think the stock is still undervalued despite today's rise," said Steven A. Parla, an analyst for Goldman, Sachs and Co. "Ultimately the sum of the two parts will trade at higher than current values."

Also yesterday, Primark announced a $53.2 million charge to earnings in the fourth quarter, primarily for the writedown of assets in the aviation services subsidiary. The writedown reflects the previously announced loss of the UPS business. Primark said the subsidiary is "continuing to pursue a number of alternatives" and may in the future "reach a binding agreement with a major transportation company" to which it would provide training and services. Primark refused to name the company.

In recent years, especially since it moved its headquarters from Michigan to Washington in 1984, Primark has been aggressively seeking to diversify into other businesses because of concerns that its core natural gas operations would not provide adequate growth. Primark is the Washington area's eighth-largest company.

About 9 percent of Primark's $993.6 million in revenue for the first three quarters of 1987 came from nongas operations, including a 24-hour television network that broadcasts medical education to hospitals around the country; a financial services company, and a subsidiary that supplies pilots and maintenance services to the overnight delivery industry. Fourth-quarter results have yet to be released.

Stewart said the company has been exploring the possibility of a restructuring since last August, when the company was hurt by the decision of one of its major customers, United Parcel Service, to assume direct control of its jet flight and maintenance operations. Since then, the company's stock has been lagging, he said; its value was also depressed by the October stock market collapse.

Although Stewart said that Primark has no knowledge of any hostile suitors, he added, "You never like to see your stock price low for defensive reasons and shareholder reasons ... I felt that if we spun off MichCon, we'd get more value for shareholders."