"to not do" or "not to do"

to not do something, especially something enjoyable that you think might be bad

why not

not to do something,esp…

Are both ways correct?

Thanks

Both ways can be correct. It depends on context.