UN Charter, Chapter I, article 2.
The Organization and its Members, in pursuit of the Purposes stated in Article 1, shall act in accordance with the following Principles.
1. The Organization is based on the principle of the sovereign equality of all its Members.
2. All Members, in order to ensure to all of them the rights and benefits resulting from membership, shall fulfill in good faith the obligations assumed by them in accordance with the present Charter.
3. All Members shall settle their international disputes by peaceful means in such a manner that international peace and security, and justice, are not endangered.
4. All Members shall refrain in their international relations from the threat or use of force against the territorial integrity or political independence of any state, or in any other manner inconsistent with the Purposes of the United Nations.
5. All Members shall give the United Nations every assistance in any action it takes in accordance with the present Charter, and shall refrain from giving assistance to any state against which the United Nations is taking preventive or enforcement action.
6. The Organization shall ensure that states which are not Members of the United Nations act in accordance with these Principles so far as may be necessary for the maintenance of international peace and security.
7. Nothing contained in the present Charter shall authorize the United Nations to intervene in matters which are essentially within the domestic jurisdiction of any state or shall require the Members to submit such matters to settlement under the present Charter; but this principle shall not prejudice the application of enforcement measures under Chapter Vll.
http://www.un.org/aboutun/charter/chapter1
UN Charter, Chapter XVI, article 103
In the event of a conflict between the obligations of the Members of the United Nations under the present Charter and their obligations under any other international agreement, their obligations under the present Charter shall prevail.
http://www.un.org/aboutun/charter/chapter16.shtml