We have developed a method for the nondestructive characterization of critical current distribution in MgB2 wires based on magnetic microscopy. This method enables us to evaluate critical currents of MgB2 wires, even in the condition where they become too large to be measured by the conventional four-probe transport method from the viewpoint of heat generation and/or the limitation from the measurement system. Furthermore, the inhomogeneity in local critical currents in the wires can be also estimated, while it is difficult for the conventional magnetization method, using a SQUID magnetometer. In this paper, by overcoming the influence of magnetic sheath materials, which are widely used for recent high-performance MgB2 wires, we have succeeded in developing a nondestructive method for the characterization of longitudinal distribution of local critical currents in them. This method will become a fundamental technique for a nondestructive product testing at the stage of full-fledged commercial production in the future.