。
I learned of his death through a message relayed by others.
Literal
He [subject-が] died thing [topic-は] verbal-message [by-に] learned.
言伝 (ことづて, 'verbal message, word relayed through a third party') is a specific term for information passed along orally rather than directly. 死んだこと ('the fact that he died') uses こと to nominalize. に知りました uses に to mark the means. The sentence highlights the indirect way the news arrived — a pre-telephone-era communication method.