I have a wall charger for my android device that has started to leak charge on the micro usb male connector when powered on. What could be the reason for this and how can I fix it? It plugs into a 2 pin socket
What you probably mean is that you feel a "tingle" or small electric shock when touching the metal part of the micro USB connector.
That's not "leaking charge" but a mains voltage coupling to the output.
This happens because the output is not 100% isolated from the input. There is always some capacitive coupling between input (mains) and output (USB) on any mains adapter. It simply cannot be avoided.
On a proper adapter this coupling induces only a small current which you can sometimes feel but which is not dangerous (assuming a safe and non-defective adapter !).
What can you do about it ?
Some mains adapters have a grounded mains input and also ground the output (sometimes via a resistor), in these adapters the current finds an easier path through the ground connection so there's no "tingle". Of course this only works when the mains ground is actually connected to ground !
If it is a non grounded 2-pin mains connection type adapter then there's little you can do but use a different adapter with less "tingle".
You cannot and should not modify an adapter to make it "tingle" less because it might become damaged, unsafe or violate EMI regulations after any change. Also: it is simply not worth the effort.
Maybe it's nothing but there are MANY criminally bad USB chargers out there. If you did not buy it from the manufacturer through a trustworthy supply chain I would suggest tossing it in the recycling and buying a new one that is properly approved before it kills you or someone else.
I have seen fake "Apple" chargers with creepage way under the 8mm minimum and metal debris rattling around inside that could short directly from mains to output. They lack (real) UL/CSA etc. markings and could never be approved with the design they have. They also lack OVP protection so they could burn up your expensive smartphone.
The small current that others are talking about is typically from something like a 1nF capacitor that is essentially between the mains and your body. Real approved capacitors are tested at extremely high voltage and have a construction that makes failures to short (which is how it would go) relatively unlikely (many thousands are tested at high temperatures for long periods of time, perhaps in equipment I designed). Fly-by-night outfits will throw in a 400V cap and hope for the best, and if you die they've moved onto something else and they are too far away to punish.