The game you're thinking of is Heart of Darkness. It's a cinematic puzzle-platformer where a young boy ventures into a dark, shadowy world to rescue his dog, only to be pursued by the very shadows that inhabit it. Its eerie atmosphere and hand-drawn style make it quite memorable.