Contains spoilers.
To get this ending you have to help officer cunningham at the start.
Try and save JP Sater at the devils pit.
Then at the very end of the game, choose to save officer cunningham.
To ensure this ending when playing through the game incap enemys and do not kill them.
Basically all morally good choices.