Melvin W. Jones, the District's top tax official, resigned unexpectedly yesterday, in a move that creates a second key vacancy among Mayor Marion Barry's cabinet-level financial advisers.

Jones, director of the Department of Finance and Revenue since September 1984, is resigning effective Aug. 1 to become a vice president and treasurer of Howard University.

According to city government sources, Jones' resignation angered Barry, who has struggled unsuccessfully for more than a year to fill the post of deputy mayor for finance, which oversees Jones' department as well as the budget and controller's offices.

"The timing couldn't be worse," said one official.

The official added that the mayor is trying to show signs of stability in his administration in the face of an ongoing federal probe into District government contracting and the sentencing this week of former deputy mayor for finance Alphonse G. Hill, who pleaded guilty to defrauding the city government.

D.C. Council member John A. Wilson (D-Ward 2), chairman of the Finance and Revenue Committee of the council, said yesterday he was "disturbed" by the two high-level financial vacancies in Barry's cabinet. "We need leadership . . . . {The District} could be flirting with serious {economic} disaster, and I'm not exaggerating," he said.

Wilson, who led two successful fights to avoid income tax increases proposed this year by Barry, said the city is facing long-term strains caused by high taxation and the growing costs of financing the city's debts. In addition, Wilson said, the city's bond market rating could slip if officials do not address the city's underfunded pension liabilities, which may be aggravated by an expected rush of retirements during the next few years.

"I wish we could get some continuity," Wilson said.

Officials said it may be difficult for Barry to find a replacement for Jones before his resignation takes effect. The deputy mayor post has been vacant since March 1986 when Hill resigned after acknowledging receiving $3,000 from a city contractor.

Jones, who declined to comment yesterday on his job change, wanted to leave earlier than Aug. 1, according to sources, but agreed to stay longer after Barry asked Howard University President James E. Cheek to allow Jones more time. "In considering the resignation," Barry said in a prepared statement, he asked Cheek to consider "both the needs of the city and the needs of the university."

Barry, interviewed on Tuesday and early yesterday, initially declined to confirm that Jones had submitted his resignation. Barry's office issued his statement later yesterday after the mayor left on an overnight trip to Flint, Mich., where he will participate in a public discussion on cooperation between blacks and Jews.

Jones, 36, a former city controller, who is currently the senior finance official in the Barry administration, oversees a $22 million-a-year budget and a 570-employe agency responsible for tax collection and revenue forecasting that is critical in planning the city's $3 billion budget.

Jones' resignation is the latest problem to surface in Barry's attempts to put together a financial team for his third term. Barry's choice to succeed Hill earlier this year -- a municipal bond specialist from New York -- decided against taking the job after she and her husband decided it would be too costly to sell holdings that might have represented conflicts of interest.

Barry then announced that David A. Rivers, the secretary of the District, would serve as his "interim cluster coordinator" to oversee the Finance and Revenue Department, budget office and controller's office -- divisions that fall under the deputy mayor for finance.

City government sources said Barry was concerned about the council's unfriendly treatment of his tax plans and internal squabbling among Jones, Budget Director Richard C. Siegel and Controller N. Anthony Calhoun.

Rivers went on administrative leave with pay in late May after his name surfaced in the contracting probe. Rivers has not been charged with any wrongdoing, but Rivers' attorney has said he believes Rivers is a target of the investigation.