In order to investigate the three-dimensional structures of intrusive granite and the deep structure of the Darbut fault in the northwestern margin of the Karamay region, western Junggar Basin, China, new magnetotelluric data were collected along six profiles across the Darbut fault. The magnetotelluric data were processed using a robust estimation technique to obtain the magnetotelluric impedance. Then the off-diagonal components of the impedance tensor were inverted using a three-dimensional nonlinear conjugate gradient inversion technique, which was performed using open-source three-dimensional electromagnetic inversion software. The final three-dimensional model includes two major low-resistivity anomalies and two major high-resistivity anomalies. The first low-resistivity anomaly corresponds to the location of the Darbut fault, which indicates that metallic elements are abnormally enriched there. The second one is located beneath the Darbut fault, and it is most likely a magma channel in the middle crust. The two major high-resistivity anomalies are distributed on either side of the Darbut fault. We interpret them as Karamay rocks and Akebasitao rocks and suggest that they were formed in an extensional setting. The cross sections of three-dimensional magnetotelluric inversion result reveal that the Darbut fault has been reformed by the later magmatism, leading to the variation of its downward extent along its strike. Moreover, our inversion result also indicates that a magma channel exists in the middle crust of the region.