Chaotic motion of electrons causes a considerable decrease in gain and efficiency of free-electron lasers (FELs). In this paper, we study chaotic dynamic of electrons moving with relativistic velocity in a realizable (three-dimensional) quadrupole wiggler when the radial dependency of wiggler magnetic field is fully taken into account using time series, Poincaré surface-of-section maps and Liapunov exponents. The electron beam is also considered to be realizable with Gaussian density profile and an ion-channel is considered as a guiding device for electron beam. We show that the chaotic behavior of electron motion is due to the nonlinearity of quadrupole wiggler magnetic field and the chaotic electron motion occurs at almost large radial distances in which the wiggler magnetic field is large. Also, we find that one can control the electron chaotic motion by using electron beam with Gaussian density rather than the electron beam with uniform density. Furthermore, we investigate the effect of ion-channel and find that when the electrostatic force of ion-channel overcomes the non-linearity effect of quadrupole wiggler magnetic field and self-repulsive force arises from electron beam, the electron motion becomes non-chaotic. We also investigate the electron motion under Budker condition and show that the Budker condition cannot guarantee the electron motion becomes completely non-chaotic.