The dealloying behaviour of Ni38Mn62 binary alloy was investigated in Li2SO4 and NH4H2PO4 solutions under different electrochemical conditions. Ni–Mn alloy ribbons with a thickness of 20 μm were prepared through arc melting followed by melt spinning. The melt-spun Ni–Mn alloy comprised of NiMn and NiMn2 phases. The NiMn phase, a few hundred nanometers across, preferentially precipitated along the grain boundary. After electrochemical dealloying treatment in 0.16 M Li2SO4 solution under open circuit potential and anodic polarization at −0.6 V, selective dissolution of the Ni–Mn alloy was observed at the grain boundary and also in the interfacial region between the NiMn phase and NiMn2 phases. The Ni–Mn alloy formed a nanoporous structure in 0.17 M NH4H2PO4 solution due to its high pH buffer ability under open circuit potential. Two types of nano-pores were formed under −0.45 V and −0.4 V, one with dimensions of a few hundred nanometers and the other only tenths of nanometers. Unlike the NiMn2 phase, the NiMn phase remained stable along the grain boundaries and exhibited noble electrochemical properties. Since different nanoporous structures were formed in regions where the microstructure was heterogeneous, we propose that a homogeneous microstructure is a key factor in the formation of uniform nanoporous structures during the electrochemical dealloying of the alloys.