Speaking at the 66th Annual Session of the NATO Parliamentary Assembly, Jens Stoltenberg made the comments while addressing questions from parliament members.
Speaking during the session, German lawmaker and NATO Parliamentary Assembly member Jurgen Trittin claimed that Turkey does not share NATO's values and there is no rule of law in the country.
Trittin also claimed that Turkey is breaching the U.N. arms embargo in Libya and threatening German vessels in the Eastern Mediterranean.
"Shouldn't we look at Turkey not as a partner, but as a spoiler and threat to NATO?" he said.
In reply, Stoltenberg said: "Turkey is a valuable ally and an important ally because they play a key role, for instance, in the fight against international terrorism."
He said Turkey is the only NATO ally fighting against Daesh in Iraq and Syria.
"They've been important in providing the infrastructure and platforms for liberating the territories controlled by ISIS,” Stoltenberg said, using an acronym for Daesh.
"No other ally suffered more terrorist attacks than Turkey, and no other ally hosts more refugees -- close to 4 million refugees," he added.
Stoltenberg also said he expressed concerns about Turkey's decision to buy Russian S-400 air defense systems and developments in Libya and the Eastern Mediterranean to Turkish President Recep Tayyip Erdoğan in his recent visit to Ankara.
The head of the Turkish delegation to the NATO Parliamentary Assembly, Osman Aşkın Bak, also responded to Trittin.
"Turkey is a democratic country, a valued ally, and Turkey has taken part in all NATO missions.
"Turkey, as the secretary-general said, is the only country that fights against Daesh/ISIS chest to chest on the ground in Syria," he said.
Bak also condemned Trittin's comments.