Alloys around eutectic points are thought to be good glass formers. However, the glass-forming ability (GFA) as a function of composition from pure metals to the eutectic alloy has not been quantified and the underlying microstructural and dynamical origins are unclear. In this work, the GFA of Cu–Ag alloys at various compositions was thoroughly investigated by using molecular dynamics simulations. According to the results, the critical cooling rate for glass formation Rc (K/s) varies with solute content x′ (at%), following Rc ≈ Aexp(kx′) where A = 4.61 × 1012 and k = -0.25 on the Cu side and A = 4.43 × 1012 and k = -0.19 on the Ag side. The Rc of the eutectic alloy is about 5 orders of magnitude lower than that of the pure metals. Structurally, the number of densely packed icosahedral-like clusters in Cu–Ag metallic glasses increases with increasing solute content, resulting in the most densely packed structure at the eutectic composition. The dynamical properties of Cu–Ag melts are basically independent on composition at high temperatures, but obviously change with composition at low temperature. Besides the largest reduced glass transition temperature, the highest five-fold symmetry (FFS) local structure and more importantly the retarded dynamics of liquid atoms below the liquidus temperature around the eutectic composition impart the eutectic alloy with the best glass-forming ability.