Former UN rights chief Navi Pillay will lead the United Nations' open-ended inquiry into systematic abuses in Israel and the Palestinian territories.
The UN Human Rights Council's president said Ms Pillay would lead a three-person investigation into abuses and their root causes in the decades-long conflict.
A commission of inquiry is the highest-level investigation that can be ordered by the council.
The inquiry was triggered during a special session of the council on May 27 to discuss the surge in deadly violence between Israelis and Palestinians earlier in the month.
The conflict killed 260 Palestinians, including some fighters, according to Gaza authorities.
In Israel, 13 people were killed, including a soldier, by projectiles fired from Gaza, the police and army said.
The council established an ongoing independent, international commission of inquiry to investigate "all alleged violations of international humanitarian law and all alleged violations and abuses of international human rights law" in Israel and the occupied Palestinian territories, including East Jerusalem.
It will look into "all underlying root causes of recurrent tensions, instability and protraction of conflict, including systematic discrimination and repression based on national, ethnic, racial or religious identity".
The commissioners were mandated to get to the facts and circumstances surrounding violations and identify those responsible "with a view to ensuring that perpetrators of violations are held accountable".
The council has so far ordered eight investigations into rights offences committed in the Palestinian territories, but this is the first with a mandate to examine root causes and investigate systematic abuses.
The resolution was presented by Pakistan on behalf of the Organisation of Islamic Co-operation. It passed with 24 of the council's 47 members in favour.
The commission will report to the Human Rights Council in Geneva each year from June 2022.
This commission is the first open-ended inquiry – others, like one on Syria, need their mandates renewed every year.
The UN human rights commissioner, Michelle Bachelet, will update the council in September on progress made in implementing the resolution.
Ms Pillay, a South African former judge, served as the UN high commissioner for human rights from 2008 to 2014.
She will be joined by Miloon Kothari of India, the first UN special rapporteur on adequate housing, and Australian international human rights law expert Chris Sidoti.
They will travel to the region to meet witnesses and victims.
They will be backed up by a secretariat including professional investigators and legal analysts.
The Israeli permanent mission to the UN in Geneva said the commission was created during a "flawed and biased" council session convened "with the sole intent of attacking Israel".
"Not surprisingly, the purpose of this mechanism is to find Israeli violations, while whitewashing the crimes committed by Hamas, a terrorist organisation in the Gaza Strip," the mission said.
Israel therefore "cannot and will not co-operate with such an investigation".