With a booming voice and speaking cadence that hinted of the pulpit — his parents were preachers — Mr. Cummings was a compelling figure on Capitol Hill for more than two decades, repeatedly returned there by voters in Maryland’s Seventh Congressional District, which takes in much of Baltimore, including a section of the city with more than its share of social problems. He campaigned tirelessly for stricter gun control laws and help for those addicted to drugs. He was at times gruff, but always respected.

But it was as chairman of the House Committee on Oversight and Reform — the panel charged with maintaining integrity in government — that Mr. Cummings may have left his most lasting legacy. The position gave him sweeping power to investigate Mr. Trump and his administration, and he used it.

He sparred with Mr. Trump in the most public of ways. In February, he summoned the president’s former lawyer, Michael D. Cohen, to testify about hush money payments to women who claimed to have had an affair with Mr. Trump; Mr. Cohen denounced Mr. Trump as a “racist” and a “con man.” And he issued subpoenas for Mr. Trump’s financial records; Mr. Trump responded by suing him, prompting him to call the president’s effort to block congressional inquiries “far worse than Watergate.”

In an interview with The Times in May, Mr. Cummings was asked what message he would like to send to the president.