Breakdown of O conselheiro deixou-lhe escrever a carta.
escrever
to write
a carta
the letter
lhe
to him / to her / to you (formal)
deixar
to leave (behind) / to quit / to let (allow)
Questions & Answers about O conselheiro deixou-lhe escrever a carta.
Why is it -lhe (indirect object) here instead of -o (direct object), even though the English translation is just "let him"?
This is because of how causative verbs like deixar (to let) work when combined with another verb. The second verb here, escrever, already has a direct object: a carta (the letter). Portuguese avoids having two direct objects in this kind of structure. Since the letter is the direct object, the person doing the writing (the "causee") gets bumped to the indirect object position, which is why we use -lhe.
If we didn't mention "the letter", would the pronoun change?
Exactly! If the advisor just "let him write" without specifying what he was writing, the verb escrever wouldn't have a direct object anymore. In that case, the person doing the writing becomes the direct object, and you would use -o: O conselheiro deixou-o escrever.
Could the pronoun be attached to the infinitive, like deixou escrever-lhe?
No, that would change the meaning entirely. When dealing with a causative verb like deixar, the pronoun for the person being allowed to do the action must attach to the conjugated verb (deixou-lhe). If you wrote deixou escrever-lhe, the -lhe would become the receiver of the writing, meaning "The advisor let [someone] write to him".
Is it possible to use que and conjugate the second verb instead of using the infinitive?