Baghdad and the regional government need to achieve compromises "on the basis of territorial integrity and the realization of the ideals to build a common future", Erdogan told UN members during his address to the General Assembly in New York.
"Steps such as demands for independence that can cause new crises and conflicts in the region must be avoided," he said.
Erdogan told reporters later in the day that the Turkish government was considering sanctions if the KRG proceeds with the referendum.
Residents in provinces controlled by the KRG are scheduled vote Sept. 25 on independence from Baghdad.
The oil-rich province of Kirkuk is among the contested areas where the vote is planned.
Last week, Iraqi lawmakers voted against the independence referendum and called on the Baghdad government to negotiate with the KRG.
The Iraqi government is opposed to the poll, claiming it would affect the war against Daesh, cause instability and violate the Iraqi Constitution.
Turkey, the U.S., Iran and the UN have all backed Baghdad in speaking out against the referendum.
Turning to the ongoing violence against the Rohingya Muslim minority in Myanmar, Erdogan said the situation risked going down in history as a "dark stain".
“The Muslim community in the Rakhine region of Myanmar is being subjected to almost an ethnic cleansing, with provocative terrorist acts used as a pretext," Erdogan said. "The villages of the Rohingya Muslims, who have already been living in extreme poverty and misery and deprived of their citizenship rights, are burned down as hundreds of thousands of people are forced to migrate from the region and the country," he added.
The international community "has not given a good account of itself" regarding the "humanitarian plight," Erdogan said, describing the atrocities as "collective punishment" at a UN panel.
"If this tragedy in Myanmar is not stopped, the history of humanity will face the embarrassment of another dark stain," he said.
About 421,000 Rohingya Muslims have crossed from Myanmar to Bangladesh since Aug. 25, the UN said Tuesday.
The Rohingya, described by the UN as the world's most persecuted people, have faced heightened fears of attack since dozens were killed in communal violence in 2012.
Last October, following attacks on border posts in Rakhine's Maungdaw district, security forces launched a five-month crackdown in which around 400 people were killed, according to Rohingya groups.
The UN documented mass gang rapes, killings -- including of infants and young children -- brutal beatings and disappearances committed by security personnel.
In a report, UN investigators said such violations may have constituted crimes against humanity.
On the Syrian conflict, Erdogan said Turkey hosts more than 3 million refugees from the war-torn Middle East nation and has spent upwards of $30 billion to help them.
"In Syria, a civilization is being annihilated together with civilians and innocent children," he said.
"Turkey could not remain indifferent to the tragedy of these people whom we see as our brothers and sisters regardless of their origin or creed and to whom we are connected with deep historical ties."
Erdogan stressed, however, that Ankara has not received sufficient support from the international community for its contributions to the Syrian refugee response.
He said the European Union sent 820 million of the 6 billion euros it promised, while donations through the UN remained at $520 million. Nothing goes to the government budget, he said, but is instead directly delivered to those in need.
"Before the whole world, I hereby call on the countries and the international organizations, which have put all the burden of the 3.2 million people on Turkey's shoulders, to fulfill the promises they have made," the president said.
With $6 billion of humanitarian and development aid in 2016, Turkey ranked as the world's second largest donor and top contributor in terms of Gross National Product, according to statistics from the Organisation for Economic Co-operation and Development (OECD).