Ничего (ничему, ничего, ничем, ни...чём) is used to denote the absence of something, it refers to an unidentified thing which doesn't exist or isn't present and is the accusative of ничто.
It declines similarily to the corresponding interrogative/relative pronoun. When it is used with a preposition, the prefix ни- is detached and the preposition comes between ни and the second part of the pronoun (ни...чему, ни...чего, ни...чем). Note that ничто in the accusative case takes the forms of the genitive.
When it is used in a sentence, the verb is negated with the negative particle не. Unlike English, Russian sententces can have several negatives together with a negated verb (ничего+ не+ глагол в личной форме).
Никто ничего не знает.(Nobody knows anything).
Нечего( нечему, нечего, нечем, не о чем) is used to denote the absence of an object for an action and is followed by an infinitive.
Нечего читать (nothing to read), нечего надеть(nothing to wear).
The English structure will be
There's nothing to do. Or They have nothing to do.
Besides нечего is used in some idioms
(нечего говорить--it goes without saying)
Your example belongs to idioms too.
Ему больше нечем жить.(He has nothing to live for).
Нечего can also be used in orders with negative meaning.
Нечего тут сидеть! - There is no good in sitting here.
However, this negative pronoun does not occur in the nominative case form to express negation, since impersonal consructions in which it is used do not have subject. The nominative form may occur ( нeчто), but it will have a different meaning and refer to an unspecified objects(see Indefinite Pronouns).
When it is used with a preposition, the prefix не- is detached and the preposition is placed between не and the second part of the pronoun.
(Мне с вами не о чем говорить.)
Examples.
Почему вы ничего не читаете?--Потому что мне нечего читать.