Deputy Attorney General Peter F. Flaherty reportedly has decided to resign so he can run for governor in his home state of Pennsylvania.

Flaherty, a Democrat and early supporter of President Carter, was mayor of Pittsburgh before he took the No. 2 post in the Justice Department last spring.

He declined to discuss his future plans yesterday. Bruce Campbell, a close aide both at Justice and during Flaherty's tenure as mayor, acknowledged that Flaherty was "seriously considering" a run for governor in Pennsylvania's May primary.

Another source close to Flaherty said he had already made up his mind to resign and make the race.

Attorney General Griffin B. Bell told reporters yesterday that Flaherty had not discussed any such plans with him.

Campbell said that if Flaherty did decide to run for governor he would probably have to resign by the end of the year because of a February deadline for filing in the May race.

He said rumors about Flaherty have increased since the deputy attorney general appeared in Pittsburgh on election night this month to make the rounds of television stations commenting on the local races.

Yesterday's Pittsburgh Post-Gazette reported that Flaherty had talked with former Rep. William J. Green Ill of Philadelphia about being his running mate, Green, who was defeated in last fall's U.S. Senate race by H. John Heinz, could not be reached for comment.

Richard L. Thornburgh, the former head of the Justice Department's Criminal Division, has been mentioned prominently as a Republican candidate in the Pennsylvania race.

Flaherty's selection as deputy attorney general was criticized earlier this year as something of a political payoff because of his early support for the President.

There has also been some friction with Bell, most noticeably when Flaherty's recommendation about a new U.S. attorney for Pittsburgh was turned down.

Under Bell's tenure, Criminal Division matters have come to Flaherty, while civil cases and patronage appointments have been handled by Michael J. Egan, the associate attorney general, who is considered mush closer to Bell personally.

Gov. Milton J. Shapp, whose Democratic administration has been shaken by many scandals, is not eligible to seek a third term. Other Democrats expected to seek the nomination include Lt. Gov. Ernest Kline and former state auditor Robert Casey.

The large field of Republican contenders is expected to include, besides Thornburgh, former Philadelphia district attorney Arlen Specter. There have been some reports that Republican Sen. Richard Schweiker is also considering the gubernatorial race.