Nearly a third of the police officers, firefighters and corrections workers hired by the D.C. government in the second year after passage of a controversial D.C. residency requirement lived in Maryland or Virginia at the time they were hired, according to a new D.C. Office of Personnel study.

Overall, about 17 percent of the 4,651 persons hired by city agencies during the period covered in the report, from June 1981 to May 1982, were nonresidents.

A controversial 1980 law, which some city officials claim has made it more difficult to recruit top-level talent, requires nonresidents hired by the D.C. government to move to the District within 180 days of their appointment.

The report, which Mayor Marion Barry recently sent to the City Council, concluded that while some city workers may have to be fired in the next month or two for failing to meet the residency requirement, "a cursory examination . . . suggests that the residency requirement is not having adverse impact on our system of personnel administration."

So far, only five employes hired during the reporting period were fired for failing to move to the District, according to the report. However, the report warned that "some subterfuge could be initiated on the part of some of the employees in an effort to keep their jobs."

Robert Storey, a spokesman for the Office of Personnel, said yesterday that all of the police officers and firefighters recruited during the latest reporting period apparently have met the District's residency requirement, although he conceded that "there could be subterfuge." The personnel office report predicted that the number of employes terminated for failing to meet the residency requirement will soon increase.

"Given the lack of available mortgage money and extremely high interest rates as a result of the current state of the economy, it is easy to understand the very real problem potential employes experience in their efforts to establish District residency," the report stated.

The report also noted, in assessing the long-term impact of the residency law on city government, that, "We do not know how many qualified persons simply did not apply for positions in the D.C. government because of the residency requirement."

Barry, who was scheduled to return late yesterday from a vacation trip to Jamaica, was not available to comment on the new study.

City Council Chairman David Clarke said he generally supports the residency requirement, primarily as a tool for "recycling" city revenues spent for salaries.

"We can't get a commuter tax on the income of suburban residents who work in the District , so the residency requirement is an effort to take city dollars and recycle them," Clarke said.

According to the study, D.C. public safety departments hired the largest percentage of nonresidents of any grouping of city agencies. Of the 982 new employes hired by the police, fire and corrections departments and the parole board, 322 were nonresidents.

However, 188 of those nonresidents were corrections officers assigned to the city-operated Lorton Reformatory, in suburban Virginia, and are exempt from the residency requirement.

Nonresidents made up 21 percent of new employes in the city's central personnel office, 14 percent of new employes hired by the Surveyor and the departments of Environmental Services, General Services and Transportation, 12 percent of the new employes in the departments of Human Services and Employment Services and nearly 12 percent of those hired by the executive office and a wide range of other city agencies.

Most of Barry's top aides and department heads live or have purchased homes in D.C.