Porous microstructure is a common surface morphology that is widely used in antifouling, drag reduction, adsorption, and other applications. In this paper, the lattice gas automata (LGA) method was used to simulate the non-uniform electrochemical machining of porous structure at the mesoscopic level. In a cellular space, the metal and the electrolyte were separated into orderly grids, the migration of corrosive particles was determined by an electric field, and the influences of the concentration gradient and corrosion products were considered. It was found that different pore morphologies were formed due to the competition between dissolution and diffusion. When the voltage was low, diffusion was sufficient, and no deposit was formed at the bottom of the pore. The pore grew faster along the depth and attained a cylindrical shape with a large depth-to-diameter ratio. As the voltage increased, the dissolution rates in all directions were the same; therefore, the pore became approximately spherical. When the voltage continued to increase, corrosion products were not discharged in time due to the rapid dissolution rate. Consequently, a sedimentary layer was formed at the bottom of the pore and hindered further dissolution. In turn, a disc-shaped pore with secondary pores was formed. The obtained simulation results were verified by experimental findings. This study revealed the causes of different morphologies of pores, which has certain guiding significance for non-uniform electrochemical machining.