In the present article we have obtained a class of analytical solutions for an anisotropic charged fluid distribution. The neutral anisotropic fluid sphere has already been obtained by Maurya and Gupta (Phys. Scr. 86:025009, 2012). The solutions depend upon both the anisotropic and the charge parameter. The anisotropy parameter and the electric intensity is zero at the centre and monotonically increasing towards the pressure free interface. All the physical entities such as energy density, radial pressure, tangential pressure, and velocity of sound are monotonically decreasing towards the surface.