The official said on Tuesday: "Emirati diplomat, Naji al-Noaimi, who was kidnapped in Iraq on May 16, was released this evening."
Al-Noaimi, a first secretary at the embassy in Baghdad, was seized while visiting the mission's cultural annexe in the al-Mansur neighbourhood. A Sudanese guard was seriously wounded in the abduction.
A statement from a group calling itself Banner of Islam accompanied by footage of the hostage was broadcast by Aljazeera two days later.
The kidnappers demanded that the UAE withdraw its ambassador from the Iraqi capital and shut down Al-Fayhaa, a Dubai-based Iraqi television channel.
The UAE recalled its charge d'affaires, its most senior diplomat in the Iraqi capital, the next day.
The group did not say why they wanted Al-Fayhaa closed, but the channel often comes under attack on Islamist websites, which accuse it of being a mouthpiece of Iraq's newly empowered Shia community.
Al-Noaimi was the latest in a string of Arab diplomats to be kidnapped in Iraq, which has been hit by a rash of hostage-takings of foreigners, as well as Iraqis, since the government of Saddam Hussein was overthrown by invading US-led forces more than three years ago.