In Portuguese, the position of an object pronoun changes depending on whether you are giving an affirmative or negative command.
Affirmative Commands
For affirmative commands, object pronouns attach to the end of the verb with a hyphen.
Negative Commands
When giving a negative command, words like não (not) or nunca (never) pull the object pronoun to the front, placing it immediately before the verb.
Notice that negative commands also require a different verb form (the present subjunctive). For tu commands, you swap the verb's characteristic vowel: -ar verbs take an -es ending (like escoves), while -er and -ir verbs take an -as ending. Highly irregular verbs also have unique negative command forms, such as não dês for the verb dar (to give).
Pronouns with Nasal Endings
If an affirmative command ends in a nasal sound—like -m, -ão, or -õe—the direct object pronouns o, a, os, and as gain an n and become -no, -na, -nos, and -nas.
When making these commands negative, the spelling rule no longer applies because the pronoun moves to the front in its normal form.
Combining Object Pronouns
When a command requires both an indirect object (lhe) and a direct object (o or a), they contract into a single word: lho or lha.
The same placement rules apply: attach them to the end of affirmative commands, and place them before negative commands.