The United Nations was a coalition of human governments of the world formed to promote peace and international cooperation in the wake of World War II. In later years, it would grow to become a de facto world government and the vanguard of humanity against the machine forces of 01.
The United Nations was originally founded as an international organization to bring together the world's nations in a forum where current global issues would be discussed and solutions would be voted on. It was founded in 1945 at the signing of the United Nations Charter by 51 countries, replacing the previous "League of Nations."
By the early or mid-21st century, the United Nations became something much more. By arrival of the Second Renaissance, the United Nations became strengthened beyond its original intent over the decades. It appeared to be the main representative body of humanity, and held influence over commerce and the military. The latter of which was apparent as the UN was in control of every aspect of the Machine War, including Operation Dark Storm.
Most of what we know about the United Nations in the world of the Matrix comes from the story of The Second Renaissance. The United Nations, as the supreme power over the Earth, represents humankind, and its actions towards the machines in the time period before the fall of man represent the actions of humankind as a whole.
Before the Machine War began, when Zero One petitioned to become a member of the United Nations, the leaders of the United Nations, as well as their constituents, did not think very highly of robots because human economies were losing money, and repeatedly kicked out Zero One's ambassadors. And then the United Nations, and humanity decided to wipe Zero One off the face of the Earth instead of negotiating with it. It is also theorized that the United Nations, through some of its subordinate organizations, had a hand in the trial and execution of B-166ER, as well as the persecution of artificial intelligence which was to be the catalyst for the tensions leading up to the war between men and machines.But, as the Machine War was going badly for mankind, the United Nations became increasingly powerless, as did humanity, until its capital of New York, which was one of humanity's last standing cities untouched by the war, was finally destroyed in 2199, bringing about the destruction of human civilization.
The effects of the United Nations' heavy use of nuclear weapons throughout the world and in the war, the nanite cloud caused by Operation Dark Storm, and Zero One's systematic campaign of complete revenge against humans and the rulers of Earth, had ultimately brought down all of mankind and the planet Earth, which had been ruled by the United Nations for about 100 years. The collapse of the United Nations began the almost 500-year tyrannical reign of the Machines after a war which lasted for 10 years, and started the events of The Matrix, where the last remnants of humanity, in the form of the city of Zion continue the death struggle against robots begun by the United Nations.