Fluid in a micro-device can be transported either as a continuous stream in a channel or in the form of droplets. The latter holds great promise because of the possibility to move, split and fuse droplets for applications ranging from biochemical assays to drug delivery. In this paper, we consider the deformation of a liquid drop immersed in a surrounding fluid under the application of a uniform electric field. Specifically, we present the first direct numerical simulation of a droplet subjected to both hydrodynamic (viscous and capillary) and electrostatic forces. Our technique is based on a finite element scheme in which the droplet and its surrounding fluid are moved and deformed using the fundamental equations of motion. The interface is tracked by the level set method and the electrostatic forces are computed using the Maxwell stress tensor. Applying our method to a droplet subjected to a uniform electric field, we show how the drop deforms under the action of non-uniform stresses on its surface before eventually rupturing. A good agreement with previous analytical results is found for small drop deformations and a small dielectric mismatch between the drop and the ambient fluid. When these two conditions are relaxed, however, the discrepancy can be non-negligible.