1. You need have come earlier.

2. You need not have come earlier.
(Can we use both sentences?)

The first is not used at all.

Correct would be this -- You should have come earlier.

The second is OK.