"Er kommt zu dir in der nacht."
Considering that the night is feminine and that it is your direct object why is it written with Der instead of Die?
Because it follows the preposition 'in', which can be followed by either the accusative or dative case. In this case, it is followed by the dative form of 'nacht'.
in die nacht = in the night
in der nacht = at night
The definite article for feminine nouns is die in the nominative and accusative cases, but der in the genitive and dative cases.
All article forms in German do multiple duty -- there is no form which is unique to a particular combination of gender, number, and case.
So if you see der, it's not necessarily masculine; and die is not necessarily feminine (singular); and so on.