Electrotherapy plays a crucial role in regulating neuronal activity. Nevertheless, the relevant therapeutic mechanisms are still unclear; thus, the effects of electric fields on brain tissue's mechanical properties and microstructure need to be explored. In this study, focusing on the changes in mechanical properties and microstructure of ex vivo porcine brain tissues under different types of electric fields, directional and alternating electric fields (frequencies of 5, 20, 50, and 80 Hz, respectively) integrate with a custom-designed indentation device. The experimental results showed that for the ex vivo brain tissue, the directional electric field (DEF) can reduce the elastic properties of brain tissue. Simultaneously, the DEF can increase the cell spacing and reduce the proteoglycan content. The transmission electron microscope (TEM) analysis observed that the DEF can reduce the integrity of the plasma membrane, the endoplasmic reticulum's stress response, and the myelin lamella's separation. The alternating electric field (AEF) can accelerate the stress relaxation process of brain tissue and change the time-dependent mechanical properties of brain tissue. Meanwhile, with the increase in frequency, the cell spacing decreased, and the proteoglycan content gradually approached the control group without electric fields. TEM analysis observed that with the increase in frequency, the integrity of the plasma membrane increases, and the separation of the myelin lamella gradually disappears. Understanding the changes in the mechanical properties and microstructure of brain tissue under AEF and DEF enables a preliminary exploration of the therapeutic mechanism of electrotherapy. Simultaneously, the essential data was provided to support the development of embedded electrodes. In addition, the ex vivo experiments build a solid foundation for future in vivo experiments.