Said Djinnit had been hosting talks between the governing party and those who do not want President Pierre Nkurunziza to stand for re-election.
His announcement has sparked weeks of protests in Burundi and a failed coup.
The election was due in June but was put back to 15 July following pressure from regional leaders.
Mr Djinnit was aware of the "positions expressed... on his role as facilitator by some Burundian parties", according to a UN statement.
They had complained that the talks were not focusing on the root cause of the crisis, which they say is the third-term bid.
Whatâ€™s behind the coup bid?
President Pierre Nkurunziza profile
African news updates
But Mr Djinnit said that though the dialogue had not achieved agreement on the "candidature of President Nkurunziza", there had been "progress" in other areas.
One of the leaders of the anti-third-term protests, Nininahazwe Pacifique, has welcomed the resignation saying that Mr Djinnit had "no choice".
The president "should follow this beautiful example," he added.
The presidential election was postponed by 18 days, which falls short of a call by regional leaders to delay the poll by at least six weeks.
Though he is stepping down from his role as talks mediator, Mr Djinnit remains the UN's envoy to the Great Lakes region, a UN official says.
UN envoy Said Djinnit has stepped down as mediator in the Burundi crisis - a demand of those opposed to the president's third-term bid.