1. She didn't need to leave early.

2. She didn't have to leave early.

3. She needed not to leave early.

4. She had not to leave early.
---------------------------
Are they all the same and grammatical? Do you use #4 often?

1 and 2 are common, and equivalent.

#3 means that it was necessary to stay -- not leave.

#4 would get raised eyebrows and a "huh?"