Israel, however, dismissed the inquiry as a UN Human Rights Council "kangaroo court".
William Schabas, a Canadian professor of international law, will head the panel whose other members are Doudou Diene, a Senegalese veteran UN human rights expert.
A UN statement said Amal Alamuddin, a British-Lebanese lawyer engaged to be married to Hollywood actor George Clooney would take part though Alamuddin later denied she would participate in the inquiry.
"I am honoured to have received the offer, but given existing commitments - including eight ongoing cases - unfortunately could not accept this role," she said in a statement.
It was not clear who would replace Alamuddin on the panel.
The UN statement said the independent team will investigate "all violations of international humanitarian law and international human rights law ... in the context of the military operations conducted since 13 June 2014."
A month of war, marked by Israeli air strikes on Gaza and rockets fired by Hamas militants into Israel, has killed 1,938 Palestinians and 67 Israelis while devastating wide tracts of densely populated Gaza.
The panel is to report by March 2015 to the UN Human Rights Council. Israel has long accused the 47-member state forum of bias against it.
Navi Pillay, the top UN human rights official, said on July 31 she believed Israel was deliberately defying international law in its military offensive in Gaza and that world powers should hold it accountable for possible war crimes. (Full Story)
Israel has attacked homes, schools, hospitals, Gaza's only power plant and UN premises in apparent violation of the Geneva Conventions, said Pillay, a former UN war crimes judge.
Hamas militants in Gaza have violated international humanitarian law by firing rockets indiscriminately into Israel, Pillay said.
Israeli and Palestinian negotiators resumed indirect talks mediated by Egypt on Monday on ending the war, Egypt's state news agency said, after a new 72-hour truce appeared to be holding.
In a statement, Israeli Foreign Ministry spokesman Yigal Palmor issued a statement dismissing the inquiry. He cited Israel's view that "the Human Rights Council had long ago turned into the 'terrorist rights council' and a kangaroo court, whose 'investigations' are pre-determined."
Hamas Spokesman Sami Abu Zuhri in Gaza said "Hamas welcomes the decision to form an investigation committee into the war crimes committed by the occupation (Israel) against Gaza and it urges that it begin work as soon as possible."
Israel is still angry about a UN inquiry on the December 2008-January 2009 Israeli war against Gaza, headed by South African jurist Richard Goldstone. That report said both Israel and Hamas appeared to have committed war crimes, though it was tougher on Israel.
Israel and Washington said that report was distorted and biased against Israel.