This study models the eroding process of the gap control system in electric discharge machine (EDM). A proportional plus integral (PI) controller is selected for the system with fast eroding speed such as drilling electric discharge machine (EDM), according to the model of the process. The study also designs the robust PI controller for the gap control, which improves the H2 performance subject to the maximal robust stability criterion. The gain parameters of the PI controller maximizing fitness specified by the sum of the largest negative real part of the eigen values and the inverse of integral of the squared error to a step input of the system can be sought quickly and accurately using genetic algorithms (GAs). The control performance and the eroding speed on drilling EDM are confirmed to follow from the proposed design procedure.