Have you tried treats or positive reinforcement? Walk with him by your side (this is called the "let's go" walk) and tell him "Let's Go" and if he keeps walking verbally praise him in an excited voice. If he stops or drags behind, try bending down to his level and calling him to join you. When he comes, give him a lot of praise and encourage the walk to continue by repeating the command "Let's go". You can also keep small treats (training treats, or cut treats into little bits, or use tiny pieces of grilled chicken). When he walks for a little on his own, just reach down and give him a treat, or praise. Continue walking. Walking using reinforcement in this way keeps your dog focused on you instead of distractions. By associating positive reinforcement, your pup will learn to pay attention and keep up with you if he wants attention/treats. After you master this, if you wish you can continue onto the more formal "heel" command,but that's not entirely necessary if you don't want to.
While he's behaving this way, NEVER just turn back and let him back in the house if he refuses. If you think he's tired or done walking, encourage him to come a few more steps before you go back. This means that the walk ends with YOU want it to end. This will discourage him from just peeing/pooping and running back in the house, or refusing to walk.