ANNAPOLIS (AP) _ Legislation that will allow New York's Chase Manhattan Bank to buy three ailing Maryland thrifts and operate them as a commercial bank, freeing up $500 million in frozen deposits, was signed Friday by Gov. Harry Hughes.

The Federal Reserve Board approved Chase Manhattan's application Friday to buy the three Maryland thrifts and form Chase Bank-Maryland, removing the last hurdle. The board also approved a request for bank's membership in the Federal Reserve System when the deal is consummated.

Benjamin Bialek, an aide to the governor who helped negotiate the complex deal, said Chase probably will open for business early in November.

That will mean depositors at Merritt Commercial, Friendship and Chesapeake savings and loan associations will have free access to their money for the first time since the state imposed restrictions on 102 privately insured thrifts last May.

The move came when a run by depositors on several institutions, including Merritt, threatened to bankrupt the industry.

A freeze on withdrawals, in effect at Merritt since June, will remain in place until Chase opens next month.

Depositors at Chesapeake and Friendship had been allowed to withdraw $1,000 a month from each account until last week, when, with the Chase deal on the verge of collapsing in the General Assembly, Hughes slapped on a freeze at those two thrifts. Beginning Monday, customers at Chesapeake and Friendship will again be allowed to make limited withdrawals until the Chase transaction is completed.

Hughes said the signing of the Chase bill is ''a tremendous step'' in solving Maryland's savings and loan crisis.

There are three other S&Ls where deposits totaling about $1.2 billion are frozen. Hughes said other banks are interested in two of them, First Maryland Savings and Loan Association and Community Savings and Loan Association.

If buyers can be found for those two, the state can concentrate on liquidating Old Court Savings and Loan in a way that will minimize losses currently estimated at about $175 million, the governor said.

The Chase Manhattan bill was approved by the General Assembly early Tuesday morning, and the governor and his aides have been negotiating final details of the transaction since then.

As a result of those negotiations, Hughes said Chase has agreed to:

- Extend the state a $5 million line of credit, if needed, to help finance a hardship withdrawal plan at the three thrifts where a freeze will remain in effect.

- Help finance $25 million in state loan and grant programs in areas such as housing and economic development.

- Participate in the student loan program without charging a fee to students.

- Contribute $100,000 in 1986 for charitable purposes in Maryland.

Hughes said Chase Manhattan also will consider implementing in Maryland programs such as minority purchasing and weatherization aid now in effect in New York.

Completion of the transaction will make Chase the first out-of-state bank to offer commercial banking services in Maryland.

Citicorp will be able up open as many as 20 branches next July in return for its commitment to build a credit card processing center in western Maryland that will create 1,000 new jobs in the state.