The General Assembly adopted a Liechtenstein-drafted resolution to establish the independent team with 105 - including Australia - in favor, 15 against and 52 abstentions. The team will work in coordination with the UN Syria Commission of Inquiry.
Zimbabwe, China and Russia were among the nations that voted against the draft resolution.
Liechtenstein UN Ambassador Christian Wenaweser told the General Assembly ahead of the vote: "We have postponed any meaningful action on accountability too often and for too long."
He said inaction has sent "the signal that committing war crimes and crimes against humanity is a strategy that is condoned and has no consequences."
The special team will "prepare files in order to facilitate and expedite fair and independent criminal proceedings in accordance with international law standards, in national, regional or international courts or tribunals that have or may in the future have jurisdiction over these crimes."
The UN resolution calls on all states, parties to the conflict, and civil society groups to provide any information and documentation to the team.
"The establishment of such a mechanism is a flagrant interference in the internal affairs of a UN member state," Syrian UN Ambassador Bashar Ja'afari told the General Assembly before the vote.
"Those who deserve to be held accountable in Syria are those states that created the armed terrorist groups, supported and financed them, opened to them oil and money to buy weapons, conscripted terrorists and to spread their ideologies," he said.
Also addressing the session before the vote, Iran's deputy ambassador, Gholam-Hossein Dehqani, said the UN has no jurisdiction over the matter.
"The resolution in its entirety is in violation of the charter and the fundamental principle of the states' sovereignty. According to the norms and principles of international law, enforcement of law and prosecution of criminals falls absolutely within the jurisdiction of the state.
READ MORE
Aleppo's Twitter girl meets Erdogan
Syrian ally Russia also spoke against the resolution.
The UN Commission of Inquiry on Syria was established by the Geneva-based UN Human Rights Council in 2011 to investigate possible war crimes.
The Commission of Inquiry, which says it has a confidential list of suspects on all sides who have committed war crimes or crimes against humanity, has repeatedly called for the UN Security Council to refer the situation in Syria to the International Criminal Court.
Human Rights Watch says that despite more than five years of war, the use of chemical weapons, indiscriminate aerial attacks and siege warfare against civilians, the UN Security Council is paralyzed because of Russia and China's repeated vetoes on most issues related to Syria.