The House Ways and Means Committee voted Tuesday to release former President Donald Trump’s tax returns, capping a yearslong legal and political fight.

The committee released reports and some documents that revealed details about Mr. Trump’s tax returns and audits on Tuesday, showing that he and his wife, Melania Trump, reported negative adjusted gross income in four of the six years from 2015 through 2020. The Trumps paid some form of federal taxes every year, but reported income-tax liability of $750 or less in three of the six years. A full set of tax documents is expected to become public in subsequent days.

The Internal Revenue Service hasn’t completed the Trumps’ audits for any of those years, and Democrats contended that the agency was too slow and timid in how it handled the complex, sensitive tax returns of Mr. Trump, particularly during his presidency.

The committee used a provision of the tax code that lets lawmakers on the tax-writing panel review otherwise confidential documents and make them public in a report.

“I voted to reinforce this critical principle: No person is above the law, not even a president of the United States,” said Rep. Brendan Boyle (D., Pa.), a committee member.

SHARE YOUR THOUGHTS

Do you think former President Donald Trump’s tax returns should be released to the public? Why or why not? Join the conversation below.

Democrats said the returns showed that the IRS program of automatic audits of presidents wasn’t working effectively. They released analyses that included lists of transactions, deductions and claimed losses that committee staff members say deserve further scrutiny from the IRS as it continues the audits of the Trumps.

Rep. Richard Neal (D., Mass.), the panel’s chairman, said the committee expected that mandatory audits of Mr. Trump were being conducted promptly, and anticipated the audits would account for the complex nature of the former president’s financial situation. The committee “found no evidence of that,” he said. “This is a major failure of the IRS under the prior administration.”

The IRS program for mandatory audits of presidents and vice presidents isn’t codified in the tax law but it is policy.

Photo: Eric Lee for The Wall Street Journal

The IRS started two audits of Mr. Trump’s tax returns while he was in office, with the first one starting on the day that House Democrats asked for his tax returns in 2019, according to a report released Tuesday by the committee.

An IRS letter also released by the committee offered a different timeline, saying that it started an audit in January 2018. And while the committee said only one of the audits was labeled as a “mandatory” presidential audit, acting IRS Commissioner Douglas O’Donnell said in the letter that the 2016 to 2019 returns were filed when Mr. Trump was president and so the audits were considered mandatory.

The IRS hasn’t completed its audits of Mr. Trump’s tax returns from 2015 to 2019, Mr. O’Donnell’s letter said. Mr. Trump’s 2020 tax filing is “not yet” under audit, the letter said. A separate report from the Joint Committee on Taxation indicated that the 2015 audit isn’t complete in part because the IRS and the Trumps haven’t settled all the issues from the years before that.

Rep. Kevin Hern (R., Okla.) speaking to the media after the committee meeting to discuss former President Donald Trump's tax returns.

Photo: EVELYN HOCKSTEIN/REUTERS

Mr. Neal said the committee only reached the point of releasing the former president’s tax details after the Trump administration denied Congress’s request to learn more about the audit program. Lawmakers said they settled on release in the interest of transparency.

“A president is no ordinary taxpayer,” he said. “They hold power and influence unlike any other American. And with great power comes even greater responsibility.”

A spokesman for Mr. Trump on Tuesday night called approving the release of the tax returns an “unprecedented leak by lame duck Democrats.” Unlike every president and major-party candidate since 1976, Mr. Trump didn’t voluntarily release any tax returns.

“If this injustice can happen to President Trump, it can happen to all Americans without cause,” Trump spokesman Steven Cheung said. He said the returns will show Mr. Trump built a successful business and created numerous lucrative assets throughout his career.

Mr. Trump’s businesses sometimes report significant losses on tax returns, and those losses can get carried to future years’ tax returns to offset income. The six-year snapshot released Tuesday provides a bit of a longer view, but it is still difficult to compare his tax payments to those of ordinary Americans.

In the six-year period for which the committee released tax data Tuesday, the Trumps’ adjusted gross income totaled negative $53.2 million. From 2015 through 2020, their total federal tax liability was $4.4 million, the committee report showed.

During the years released, 2018 was the anomaly, when the Trumps finished using prior years’ losses to offset income and reported $24.3 million in adjusted gross income. That figure put them in the top 0.01% of households. The only other year where they reported positive income was 2019, when they made $4.4 million.

Republicans objected to the committee’s vote to release a report and the documents. They had argued for years that Democrats were talking about IRS audits as a pretext for posting Mr. Trump’s tax returns. Democrats countered on Tuesday that the full release was necessary for public transparency.

Rep. Kevin Brady (R., Texas), the panel’s top Republican, said his party offered to have the Joint Committee on Taxation study the returns and the IRS’s audit programs. He said the analysis had been rushed and that it was premature to assess how thorough a job the IRS had done auditing Mr. Trump’s taxes.

“This is about a witch hunt that has nothing to do with changing the auditing process,” Rep. Kevin Hern (R., Okla.) said after the committee vote.

The committee voted 24-16 along party lines Tuesday to release the tax information after more than four hours in a closed-door meeting. A full set of Mr. Trump’s tax documents is expected to become public in the coming days after staff members redact information such as Social Security numbers and bank account information.

The committee obtained access to the returns late last month after the Supreme Court denied Mr. Trump’s request for a temporary order that would have blocked the committee from obtaining the tax returns from the IRS.

The court’s order left the Democrats little time to act before they lose control of the House majority and the committee on Jan. 3.

Committee Democrats have focused their legal case for obtaining Mr. Trump’s tax returns around the IRS program for mandatory audits of presidents and vice presidents. That program, in effect since the late 1970s, isn’t codified in the tax law. Instead, it is an IRS policy in the agency’s manual.

Presidents before and after Mr. Trump have released their returns, so the public knows what income they reported and what deductions they claimed. But little is known about what happened to those returns after they were filed and whether presidents had to pay more after audits.

The committee argued that it needed Mr. Trump’s returns and audit records to evaluate the program. Judges agreed, accepting the committee’s contention that it had a legitimate legislative purpose to request the records.

Mr. Neal said Tuesday that he is introducing a bill that would require the IRS to begin mandatory audits of the president. The House is expected to vote on it this week.

Write to Richard Rubin at richard.rubin@wsj.com