"We know that the order to kill Khashoggi came from the highest levels of the Saudi government," he wrote in an article in the Washington Post.
But stressing Turkey's "friendly" ties with Saudi Arabia, he added that he did not believe King Salman was involved.
Khashoggi was murdered at the Saudi consulate in Istanbul on 2 October.
Turkish investigators believe the journalist, who was living in exile, was strangled when he visited to collect documents for his forthcoming marriage to a Turkish citizen.
His body has not been found and an aide to President Erdogan, Yasin Aktay, has said he believes it was dissolved in acid after being cut up.
According to Ergodan : "We know that the perpetrators are among the 18 suspects detained in Saudi Arabia," he wrote in the Washington Post, where Khashoggi had written a column.
"We also know that those individuals came to carry out their orders: Kill Khashoggi and leave. Finally, we know that the order to kill Khashoggi came from the highest levels of the Saudi government."
Writing that the murder had involved a "lot more than a group of security officials", President Erdogan called for "the puppet masters behind Khashoggi's killing" to be exposed.
"No one should dare to commit such acts on the soil of a Nato ally again," he said. "If anyone chooses to ignore that warning, they will face severe consequences."
He complained that no action had been taken against the Saudi consul general, who has left Turkey, and accused the Saudi public prosecutor of failing to co-operate with the investigation "and answer even simple questions".
The murder, initially covered up by Saudi officials, caused a diplomatic crisis between Saudi Arabia and its allies.
The Saudis have since arrested 18 suspects who, they say, will be prosecuted in Saudi Arabia. Turkey wants them extradited.
The Saudis have admitted Khashoggi died at the consulate, while denying they know what happened to his body.
A Turkish prosecutor said earlier this week that investigators believe the journalist was immediately strangled on entering the consulate, in a murder planned in advance.
His body was then dismembered and destroyed "again, in line with advance plans", prosecutor Irfan Fidan said.
A memorial service marking four weeks since the journalist's death has been held in Washington.
Once an adviser to the Saudi royal family, Khashoggi fell out of favour with the government last year and went into self-imposed exile.
He had become a sharp critic of the Saudi government and of Crown Prince Mohammed bin Salman, who has been pioneering an ambitious economic and social reform programme in the country.
Speaking at the memorial service in Washington, Daniel Balson from Amnesty International said the Saudi government needed to be held to account over the journalist's death.
"For too long, they've operated under the impression that impunity is for them and that the rules are for others," he said.
"They believe that a government critic can disappear in their diplomatic mission and that those who care about justice will not notice or if they notice they will not object or if they object, they will not remember. Well we've noticed and we're outraged and we will not forget."
- Countries: None
- Sanctioner-in-Chief: 10 Countries Hit by Trump's Favorite Regime Change Tactic in Just Two Years
- Strong evidence ‘vicious’ murder of Khashoggi was planned operation – Erdogan
- The darknet is not a hellhole, it’s an answer to internet privacy
- Qatar’s $15 billion snub of Trump over Turkey puts another key US relationship in Middle East at risk
- Turkey Tells Israeli Ambassador to Leave over Gaza Killings