Saying the political arena offered a larger challenge, Deputy Attorney General Peter F. Flaherty announced yesterday that he is resigning to run for governor of his home state of Pennsylvania.

The announcement was not surprising, since the former mayor of Pittsburgh had done little to refute recent reports that he was eager to make the Pennsylvania race.

In a phone interview yesterday, Flaherty, a Democrat, said he had told Attorney General Griffin B. Bell of his intentions last Monday and had received both Bell's and President Carter's release from his obligation to serve the administration for four years.

"If it wasn't for the governor's race being a bigger challenge. I would stay." Flaherty said. He said he expected to leave the Justice Department by mid-December.

Flaherty dismissed specualtion that he is leaving because of unhappiness over his role at Justice. The traditional duties of the Deputy have been split so he shared with them with a close Bell associate, Michael J. Egan.

"I like the job even though it had been divided," he said. "You do have to like to be an administrator to be the deputy. It doesn't have a lot of the excitement of some of the other possitions in the department."

Flaherty, who was an early supporter of President Carter, said he began to consider the governor's race seriously earlier this month after his handpicked candidate won the election to the mayor of Pittsburgh. Another factor, he said, was a poll which showed him leading the other Democratic gubernatorial contenders.

Bell said in a settlement yesterday that February had been "an able deputy" and that he understood "the pull of home state ties." Bell aslo lauded Flaherty's "unusual talents" in reorganization.

Flaherty played a key role in the department's reorganization of the Law Enforcement Assistance Administration, which has poured $6 billion in crime-fighting grants to states and cities over the past several years. Flaherty said the recommended reorganization package, which Bell sent to the White House last week, would "substantially revise and streamline" the present LEAA system by eliminating several layers of required planning.

When Flaherty resigns he will leave behind his responsibility to review the continuing investigation into the financial activities of former budget director Bert Lance. Bell disqualified himself from dealing with that case because he owned stock in Lance's Georgia bank.

Flaherty declined to offer an opinion about a replacement. And Benjamin R. Civiletti, assistant attorney general in charge of the Criminal Division, whose name has already surfaced as a possible Flaherty successor, said he is happy in his current job.

"I think the judge [Bell] will look for another administrator for that position," he said. "I don't see why he'd want to leave two areas of the department [the deputy's office and the Criminal Division] unsettled."