"O'Brien's convoy was denied passage at the final checkpoint before crossing the frontline" into Taez, said a statement by the UN's Office for the Coordination of Humanitarian Affairs.
"O'Brien's convoy was denied passage at the final checkpoint before crossing the frontline" into Taez, said a statement by the UN's Office for the Coordination of Humanitarian Affairs (OCHA).
He was denied access to the flashpoint city "despite having received assurance of safe passage by all parties", the statement said.
OCHA did not name the party that prevented O'Brien's convoy from proceeding, but the route from the north to Taez is controlled by the rebels and their allies.
"After being denied access, the convoy returned to safer ground to continue negotiating access with the authorities controlling the final checkpoint, but to no avail," OCHA said.
"O'Brien was extremely disappointed that humanitarian efforts to reach people in need were once again thwarted by parties to a conflict, especially at a time when millions of Yemenis are severely food insecure and face the risk of famine," it added.
A local official told AFP earlier that O'Brien was stopped at a rebel checkpoint in Hizran, 15 kilometres (nine miles) northwest of Taez, while the government-run news agency Saba accused Huthi rebel forces of opening fire at his convoy.
In a statement carried by Saba, the government said the rebels blocked O'Brien's access to Taez to "prevent the truth about the situation in the city, including a suffocating siege... from reaching the world".
A UN source in Yemen told AFP earlier that O'Brien had been forced to cancel his visit to Taez "for security reasons".
The convoy travelling from the capital Sanaa had to change route because of shelling on the road to the southwestern city, said police captain Oussama Al-Charaabi, head of government security services in Taez.
The UN source said O'Brien was now slated to visit a school in the southwestern Ibb province housing internally displaced Yemenis from the Red Sea coastal town of Mokha, controlled by government loyalists since January.
Forces loyal to President Abedrabbo Mansour Hadi, backed by a Saudi-led Arab coalition, have held out in Taez where they are surrounded by the Iran-backed Huthis and their allies.
The rebels control Sanaa and much of the northern highlands of Yemen, where conflict has escalated over the past two years.
O'Brien, who is on a week-long tour of Yemen, Somalia and Kenya, warned on Monday that seven million Yemenis face "serious risk of famine" unless international donors intervene.
A further 19 million of Yemen's 26-million population now need humanitarian aid, he told a news conference.
The United Nations has called for $2.1 billion in humanitarian aid for Yemen, where UN mediation and seven ceasefire accords have failed to end a conflict that O'Brien said has cost more than 7,500 lives and left 40,000 people wounded.
The war in Yemen pits Hadi's internationally recognised government against Huthis and forces loyal to former president Ali Abdullah Saleh.
The fighting has intensified since the coalition intervened in support of Hadi in March 2015 after the Huthis seized Sanaa the previous September.