Phase-change films with multiple resistance levels are promising for increasing the storage density in phase-change memory technology. Diffusion-dominated Zn 2 Sb 3 films undergo transitions across three states, from high through intermediate to low resistance, upon annealing. The properties of the Zn 2 Sb 3 material can be further optimized by doping with Bi. Based on scanning transmission electron microscopy combined with electrical transport measurements, at a particular Bi concentration, the conduction of Zn-Sb-Bi compounds changes from p-to n-type, originating from spinodal decomposition. Simultaneously, the change in the temperature coefficient of resistivity shows a metal-toinsulator transition. Further analysis of microstructure characteristics reveals that the distribution of the Bi-Sb phase may be the origin of the driving force for the p-n conduction and metal-to-insulator transitions and therefore may provide us with another way to improve multilevel data storage. Moreover, the Bi doping promotes the thermoelectric properties of the studied alloys, leading to higher values of the power factor compared to known reported structures. The present study sheds valuable light on the spinodal decomposition process caused by Bi doping, which can also occur in a wide variety of chalcogenide-based phase-change materials. In addition, the study provides a new strategy for realizing novel p-n heterostructures for multilevel data storage and thermoelectric applications.