Rep. John Joseph Moakley (D-Mass.), chairman of the House Democratic patronage committee, has been subpoenaed to appear before and deliver documents to the federal grand jury in Brooklyn that is investigating the activities of Rep. Frederick W. Richmond (D-N.Y.).

Moakley is the first member of Congress to be called before the panel, which for five months has been looking into allegations of improprieties by the millionaire liberal congressman.

Moakley declined to comment yesterday on the subpoena under the advice of Stanley M. Brand, general counsel to the clerk of the House. Under House rules, Moakley, with advice of counsel, must decide whether complying with the subpoena will be "consistent with the privileges and rights of the House."

If Moakley agrees, his determination in the form of a letter to the House speaker would be published in the Congressional Record and any House member could introduce a resolution directing Moakley not to comply, according to Steven R. Ross, assistant general counsel to the House clerk.

The subpoena could set up a unique House vote if Richmond objects to compliance. Richmond's attorneys have maintained in court that his files and conversations with his staff relating to convict Earl W. Randolph Jr. are protected by the speech and debate clause of the Constitution.

In late 1980, Richmond recommended to Moakley that an individual named John McLoughlin be employed by the House. McLoughlin, who subsequently worked in a minor job in the House document folding room, was arrested in March, 1981, for male prostitution and discovered to be Randolph, using an assumed name.

Randolph, a longtime friend of Richmond, had escaped from Massachusetts prison authorities in July, 1980, while serving an 18-year sentence for assault with intent to murder.

The grand jury is looking into whether Richmond aided Randolph knowing he was a fugitive, a violation of federal law.

In Moakley's files is a personal history form filled out by Randolph when he was using the name McLoughlin.

Richmond's press aide, Michael Kahan, has said Richmond sent Moakley a letter recommending "McLoughlin," but Moakley has said he has been unable to find that letter. Richmond, according to Kahan, has also not been able to locate a copy of that letter.

The House Committee on Official Standards and Conduct has announced it, too, is conducting an inquiry into allegations involving Richmond.