It is Genitive. Many personal pronouns in some cases have 2 forms (longer or shorter; a few has also 3rd very short form).
Generaly, after the prepositions which govern the form of pronoun, we write the longer form of pronoun:
do ciebie instead of
do niego instead of
do nich instead of
You may read about it here - but there is probably no other way than to memorize when which form should be used.
See the forms of personal pronouns here