A new model is developed for an electron-cyclotron-resonance-heated plasma confinement in an open mirror magnetic trap. The model is based on the simultaneous study of noncollisional kinetics of electrons and gas dynamics of ions. At the trap center, the electron distribution function is approximated by bi-Maxwell distribution (with effective temperatures T and T – mean energies of the transverse and longitudinal to the magnetic field motion). Within the model framework the ion confinement time as well as the axial distribution of the ambipolar potential and plasma density has been investigated both numerically and analytically. The confinement time and potential profile are very much dependent on the electron distribution anisotropy and, in strongly anisotropic case, on the ion temperature. The ambipolar potential changes qualitatively while the ratio T/T exceeds a certain threshold value. Below the threshold, the potential falls off monotonously along the trap axis outwards from the trap center. After the threshold is exceeded, there appears a potential peak between the center and the plug. This potential peak retards ion escape through the plug and provides quite different confinement of ions with different charges in an ECR ion source.