I'm curious as to how else you would phrase "no such thing", so that it appears to you a strange enough construction as to make speaking of it's origin worth considering? It is the word no used in a normal manner, followed by the word such used in a normal manner, followed by the word thing used in a normal manner.
Such followed by thing we have from Old English "Exodus", which is believed compiled around 930-960 and composed earlier:
Hig worhton óðer swilc þing þurh hira drýcræft and þurh Egiptisce galdru fecērunt etiam ipsi per incantātiōnes Ægyptiacas et arcāna quædam simĭlĭter
No followed by such depends on when you consider nan with the final consonant dropped to stop being none and start being no. The following is earlier than that, from Ælfric's "The Homilies of the Anglo-Saxon Church", and at some point in the next couple of hundred years, na would have been used even if what followed began with a vowel, and this would be closer to no than to none.
na swilc word swa menn sprecadh, ac he is dhaes Faeder Wisdom, and word bidh wisdomes geswutelung. Thaet Word is Aelmihtig God, Sunu mid his Faeder.
While I can't find at na swilc þing or na swylc þing or similar, I think it suffices to say that by the time no and none were separate words in our language (though their senses still overlap so that some uses of "no such things" could be "none such thing", albeit that might sound a bit archaic).
If we don't care about when no began to be separate to none, then we can find "Nán swylc" in the 8th Century "Cynewulf's Christ".
"No such thing" is just normal English words used normally, rather than an idiom as such.