Magnetic anisotropy evolution of ultrathin Co films grown on a Pt(111) single-crystal surface is investigated by a UHV in situ surface magneto-optical Kerr effect (SMOKE) measurement. Perpendicular magnetic anisotropy in ultrathin Co films is found to be persistent up to a thickness of 12 ML where the easy magnetization axis changes its orientation to an in-plane direction. The interface structure of an ultrathin Co overlayer on Pt(111) was investigated with atomic-layer resolution medium-energy ion scattering spectroscopy. For 7-ML Co, interdiffusion begins at 673 K to form a heavily distorted Co-Pt surface alloy layer with little change in SMOKE intensity. However, annealing at 773 K formed a 30-atomic-layers thick Co-Pt substitutional alloy with tensile strain, at which the SMOKE intensity increased by more than 200%. The enhancement of the Kerr intensity is discussed with the interface alloy formation.