I'll go encourage him.

Literal

I [subject-が] him [object-を] encourage [purpose-に] go-[volitional-う].

励ます ('to encourage, to cheer on') — a noble friendship verb, takes を for the person encouraged. 励ましに行く uses the purposive に after the masu-stem 励まし — 'go in order to encourage.' 行こう is the volitional 'let's go / I'll go.' A proactive pledge to support someone.