Speaking to the Washington Post, Mr Trump said "We couldn't get one Democratic vote, and we were a little bit shy... so we pulled it."
The last-minute retraction is seen as a huge blow to the president.
Repealing and replacing the healthcare programme known as Obamacare was one of his major election pledges.
House Speaker Paul Ryan said he and Mr Trump agreed to withdraw the vote, after it became apparent it would not get the minimum of 215 Republican votes needed.
Republicans have a majority in both the House of Representatives and the Senate.
However, multiple reports suggested that between 28 and 35 Republicans were opposed to President Trump's draft American Health Care Act (AHCA).
Some were said to be unhappy that the bill cut health coverage too severely, while others felt the changes did not go far enough.
The bill also appeared unpopular with the public - in one recent poll, just 17% approved of it.
The Congressional Budget Office (CBO) estimated the AHCA would reduce the deficit by $336bn between 2017 and 2026.
However, the number of Americans without health insurance would stand at 52 million by the same time - an extra 24 million compared with Obamacare.
Speaking after the withdrawal, Mr Trump repeatedly said Obamacare would "explode".
However, he refrained from criticising Mr Ryan, whose job as speaker of the House involves rallying support for controversial bills.
Mr Trump said: "I like Speaker Ryan. I think Paul really worked hard.''
Mr Ryan also told reporters the president had been "really been fantastic''.
How disastrous is this for Trump? Analysis by Anthony Zurcher, US reporterHow bad was Friday's defeat of the American Health Care Act in the House of Representatives? Bad. Very bad.
The AHCA was the first major piece of legislation pushed by the White House and the Republican-controlled Congress, a key political test early in the president's term, when he should be at the height of his power and party cohesion at its strongest.
In spite of all of this, Mr Trump, Mr Ryan and the Republicans running Washington could not get the job done.
For Republicans Friday wasn't just bad. It was a disaster.
Read more analysis here.
President Trump said the Republicans would probably focus on tax reform for now.
"We have to let Obamacare go its own way for a little while," he told reporters at the Oval Office, adding that if the Democrats were "civilised and came together", the two parties could work out a "great healthcare bill".
"We learned about loyalty; we learned a lot about the vote-getting process," he said.
"I will not sugar-coat this. This is a disappointing day for us. Doing big things is hard.
"We were a 10-year opposition party where being against things was easy to do," he said, adding that it was difficult to get "people to agree with each other in how we do things".
Meanwhile, the leader of the House minority Democrats, Nancy Pelosi, described the retraction as "a victory for the American people".
What did the bill propose?
- Cuts the Medicaid programme for low earners
- Provides tax credits to help people pay medical bills, but reduced compared to Obamacare
- Ends penalties on those who do not buy health coverage
- Allows insurers to raise premiums for older people
- Blocks federal payments to women's healthcare provider Planned Parenthood for a year
- Insurers would no longer be required to include "essential benefits", such as maternity care, mental health and emergency treatment