I stumbled upon this by accident and this is hardly metal or even rock, but...
Crimean -born Petr Ivanovich Isakov, a self-taught guitarist who was in 1913 even invited to the Winter Palace in Saint Petersburg to teach the children of Emperor Nicholas II to play the guitar, recorded this track in April 1913 (so that's 110 years ago).
It is his interpretation of a Russian folk song called "Oh, My Garden" ("Ах ты, сад"), which was originally released on "Amour Gramophone Record" in 1913-1914, which is interesting here. From 0:20 to 0:40 (approx.) there is a finger-picked (?) "riff" which, because of the technology constraints in those days, actually sounds now as it was performed on an electric guitar, and as such is the earliest example of something that sounds vaguely reminding an actual riff.
You can disagree with me, that's fine, but check it out by yourself
https://www.russian-records.com/details ... 263&lng=enDirect Mp3 -link:
https://www.russian-records.com/data/me ... t-2458.mp3The original realease has been on sale on eBay, and looks like this:
https://www.ebay.com/itm/175108831183