Several U.S. government agencies have announced grants totaling more than $58 million to the District of Columbia for a long list of housing, health, environmental and energy projects.

The second largest of the grants, $18 million, will permit the District government to terminate its financing arrangements for the Southwest, Northeast, Northwest and Fort Lincoln urban renewal projects.

The grant, in effect, will wipe out loans made to the city by the federal government up to 20 years ago for redevelopment in those areas. Renewal projects are now conducted under a system of annual federal grants made to the nation's cities.

In recent years, the U.S. Department of Housing and Urban Development has witheld $7 million a year from its renewal grants to the District in order to collect on the old loans. The HUD grant this year was $34 million, reduced by the withholding to $27 million.

With the loans ended, Robert L. Moore, director of the D.C. Housing and community Development Department, said his agency's budget will in effect be increased by $7 million a year, permitting an improvement in its programs.

Other grants above $1 million announced were:

$20.7 million from the Environmental Protection Agency for construction of sewage treatment facilities.

$7.1 million for modernization of the James Creek public housing project in Southeast.

$1.4 million for weatherizing homes of low-income families, plus three other grants totaling $1 million for energy-related projects.

In addition, the U.S. Department of Health, Education and Welfare granted $400,000 to assist Mayor Marion Barry's program to reduce the city's high infant mortality rate. It provided smaller grants for other health programs.

Most of the grants are the type that the federal government awards at its discretion to states or cities that show they can effectively use the funds. While some of the money was in the government pipeline, all the grants are new and not previously announced.