Mayor Walter E. Washington approved legislation yesterday that will allow the District of Columbia to deposits its money in local financial institutions that offer the best investment returns and have good minority hiring and lending practices.

The law, called the Depository Act of 1977, establishes guidelines by which the city can invest about $1.5 billion annually in local banks, credit unions and other financial institutions.

When Congress granted the District home rule in 1974, it also gave the city the authority to move its money from its traditional depository - the U.S. Treasury.

Under the new law, as much as one-third of the city's money may be set aside for deposit in the financial institutions with the best minority hiring and lending practices. The rest of the funds will be placed in those financial institutions, on the basis of competitive bidding, that can offer the highest rate of return.

City officials said the "set aside" provision for short-term investments and deposits Virtually guarantees that the District's four minority-owned financial institutions - the Industrial Bank of Washington, United National Bank, Independence Federal Savings and Loan and Community Federal Savings and Loan - ill get the maximum allowable deposits from the city.

These institutions have traditionally offered more loans and mortgages to minorites and generally have better minority hiring practices, city officials said.

Hubert Merrick, vice president of Independence Federal Savings and Loan, said that the favored treatment of minority-owned institutions is justifiable.

"We should get favored treatment because we return the funds (through investments and loans) back into the city, and that benefits the District in all areas," Merrick said.

D.C. Corporation Counsel John R. Risher earlier had advised the mayor to veto the bill because he feared the "set aside" provision might not maximize the city's profits.

In signing the bill, however, the mayor said it adequately balances the "high-interest returns that the city could get on short-term investments and the long-range social and economic development benefits" that may come from reinvestment of the money within the District.