In the imperative what is right to say:" remember to not do" or "remember not to do" something?
Solution 1:
I believe both are grammatically correct.
IMO, "not to do" puts more emphasis on negation whereas "to not do" focuses on the verb itself. For your sake of using imperative as a prohibition/restriction, here are my suggestions as samples:
I told you not to take it outside! (Remember not to take it outside)
I told you to not throw it out! (Remember to not throw it out)
In terms of speech, stress would play a big role to convey the style and clarity.
P.S. When in doubt, always think back to Hamlet:
To be, or not to be...
Solution 2:
Both will probably succeed in expressing what you want. I would recommend: "remember to not" however because of a distinction that probably won't matter here but has philosophical import.
In Latin and medieval philosophy, there's a distinction between volo, non volo, and nolo ("I will", "I do not will", "I will against" or "I will not to"). In the case of verbs of will, there's a clear distinction between cases where you will to do something, you will to not do something, and you will not to / will against doing something. In such cases the sequence matters as to what's being negated.
I will to eat ice cream
I will to not eat ice cream
I will not to eat ice cream
Depending on the language user, a distinction might be meant between the second two with "will to not" being an act of will whose content is "to not eat ice cream" whereas the latter becomes a negating act of will against the idea of eating ice cream.
My sense, however, is that this distinction will be utterly lost and meaningless in all but the most technical contexts and then only for a subset of verbs related to willing and thinking. I think remembering might qualify as one of those.
So I would recommend "remember to not ..." and would not recommend "remember not to" for fear that the negation will be applied to the remembering rather than to that which is to be remembered.