The problem was that I had nothing to say to him.

Literal

Problem [topic-は] I [subj-が] him [to-に] anything say thing [subj-が] not-exist [quotative-という] thing [copula-だった].

何も…ない is the 'nothing at all' pattern — 何も pairs with a negative predicate. 言うことがない means 'there is nothing to say,' with こと nominalizing the verb. The whole clause is framed with ということだった in past tense.