The best way to clean a chain is to use a chain cleaning device. They are specifically made to do a really good job. You can improvise using two toothbrushes and a small piece of rubber, like from an old tube, and some tape as well.
Roll the rubber piece up and put it between the two toothbrush bodies. Then wrap tape around the brushes and rubber piece. Now use degreaser on the chain and press the improvised chain cleaner on the chain. Be careful not to get any grease on the brakes.