De Blasio on Friday in New York City said he wished he had more time and resources.
"I think in a field of 20-something candidates, it's hard to understand exactly what happened in the course of the campaign," de Blasio said.
"I feel very good about the message, I feel that people want progressive change, they want to focus on the needs of working people.
The message resonated really well, I wish I had more time, I wish I had more resources.
I think that would've made a difference." De Blasio, 58, launched his candidacy in May with the central slogan, "Working People First," and found himself in a crowded field of Democrats hoping to take on President Donald Trump in next year's election.
De Blasio first announced his exit, which leaves 19 Democrats vying to be the party's nominee, on MSNBC's Morning Joe show.
The mayor, who is barred from seeking a third four-year term in New York in 2021, struggled to build a national profile and stand out in a field that included former Vice President Joe Biden and a long list of experienced politicians.
De Blasio had registered little support in polls and was eclipsed by progressive U.S. senators Bernie Sanders and Elizabeth Warren.
Trump greeted news of de Blasio ending his presidential bid with sarcasm.
"Oh no, really big political news, perhaps the biggest story in years!
Part time Mayor of New York City, @BilldeBlasio, who was polling at a solid ZERO but had tremendous room for growth, has shocking dropped out of the Presidential race," Trump tweeted early on Friday.
"NYC is devastated, he's coming home!" De Blasio said on MSNBC that a "central reason" for his decision was the party's rules for qualifying for televised debates.
He had failed to qualify for a Sept.
12 debate that featured the 10 leading candidates for the party's nomination.