Although the first may be gramatically acceptable (although I doubt it, really), the second is certainly more natural.
The first expression is more fitting for something that happens habitually. For example, "He was known to overeat when nervous" is correct, as oposed to "He was known overeating when nervous." I think I would even allow "he was seen overeating when nervous" in this sense.
Student or Learner